This commit is contained in:
akrike
2025-03-20 01:13:57 +08:00
parent d488e89e57
commit 8eb8888a5a
10 changed files with 54 additions and 53 deletions

View File

@@ -20,13 +20,15 @@ func (p *pushApi) GetPushById(ctx *gin.Context) {
rOk(ctx, "Query successful!", repository.PushRepository.GetPushConfigById(id))
}
func (p *pushApi) AddPushConfig(ctx *gin.Context, req model.Push) {
func (p *pushApi) AddPushConfig(ctx *gin.Context) {
req := bind[model.Push](ctx)
err := repository.PushRepository.AddPushConfig(req)
errCheck(ctx, err != nil, err)
rOk(ctx, "Operation successful!", nil)
}
func (p *pushApi) UpdatePushConfig(ctx *gin.Context, req model.Push) {
func (p *pushApi) UpdatePushConfig(ctx *gin.Context) {
req := bind[model.Push](ctx)
err := repository.PushRepository.UpdatePushConfig(req)
errCheck(ctx, err != nil, err)
rOk(ctx, "Operation successful!", nil)