bitget asp 서버 추가
This commit is contained in:
24
Bitget_Server/Controller/PushAlarmController.cs
Normal file
24
Bitget_Server/Controller/PushAlarmController.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Bitget_Server.EFCore.Models;
|
||||
using Bitget_Server.EFCore;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Bitget_Server.Controller
|
||||
{
|
||||
|
||||
[ApiController, Route("api/push")]
|
||||
public class PushAlarmController : ControllerBase
|
||||
{
|
||||
private readonly BitgetContext context;
|
||||
|
||||
public PushAlarmController(BitgetContext _context)
|
||||
{
|
||||
context = _context;
|
||||
}
|
||||
|
||||
[HttpGet, Route("newalarm")]
|
||||
public List<PushAlarm> GetAlarm(int index)
|
||||
{
|
||||
return context.PushAlarms.Where(x => x.Id > index).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user