add endpoint for delete

This commit is contained in:
Cubicroot 2021-06-06 19:30:25 +02:00
parent 3834e90527
commit b392ea1b44
6 changed files with 65 additions and 34 deletions

View file

@ -6,7 +6,7 @@ import (
// Notification holds information like the message, the title, and the priority of a notification.
type Notification struct {
ID uint `json:"id"`
ID string `json:"id"`
ApplicationID uint `json:"appid"`
Message string `json:"message" form:"message" query:"message" binding:"required"`
Title string `json:"title" form:"title" query:"title"`
@ -17,11 +17,6 @@ type Notification struct {
// DeleteNotification holds information like the message, the reply to message id and the priority of a deletion notification.
type DeleteNotification struct {
ID uint `json:"id"`
DeleteID uint `json:"deleteid"`
ApplicationID uint `json:"appid"`
Message string `json:"message" form:"message" query:"message" binding:"required"`
Priority int `json:"priority" form:"priority" query:"priority"`
Extras map[string]interface{} `json:"extras,omitempty" form:"-" query:"-"`
Date time.Time `json:"date"`
ID string `json:"id" form:"id"`
Date time.Time `json:"date"`
}