Add nilaway and rework test setup

This commit is contained in:
eikendev 2025-02-16 00:15:50 +01:00
parent e657884326
commit b0699da1e9
No known key found for this signature in database
15 changed files with 309 additions and 184 deletions

View file

@ -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)