mirror of
https://github.com/pushbits/server.git
synced 2025-06-14 00:22:15 +02:00
Introduce middleware for parsing ID from URI
This commit is contained in:
parent
e1cd2d2f8e
commit
018ce2e537
8 changed files with 74 additions and 50 deletions
|
@ -31,7 +31,7 @@ type NotificationHandler struct {
|
|||
func (h *NotificationHandler) CreateNotification(ctx *gin.Context) {
|
||||
var notification model.Notification
|
||||
|
||||
if success := successOrAbort(ctx, http.StatusBadRequest, ctx.Bind(¬ification)); !success {
|
||||
if err := ctx.Bind(¬ification); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue