mirror of
https://github.com/pushbits/server.git
synced 2025-06-09 14:12:15 +02:00
Add nilaway and rework test setup
This commit is contained in:
parent
e657884326
commit
b0699da1e9
15 changed files with 309 additions and 184 deletions
|
@ -44,6 +44,10 @@ type NotificationHandler struct {
|
|||
// @Router /message [post]
|
||||
func (h *NotificationHandler) CreateNotification(ctx *gin.Context) {
|
||||
application := authentication.GetApplication(ctx)
|
||||
if application == nil {
|
||||
return
|
||||
}
|
||||
|
||||
log.L.Printf("Sending notification for application %s.", application.Name)
|
||||
|
||||
var notification model.Notification
|
||||
|
@ -78,6 +82,10 @@ func (h *NotificationHandler) CreateNotification(ctx *gin.Context) {
|
|||
// @Router /message/{message_id} [DELETE]
|
||||
func (h *NotificationHandler) DeleteNotification(ctx *gin.Context) {
|
||||
application := authentication.GetApplication(ctx)
|
||||
if application == nil {
|
||||
return
|
||||
}
|
||||
|
||||
log.L.Printf("Deleting notification for application %s.", application.Name)
|
||||
|
||||
id, err := getMessageID(ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue