feat: expand superadmin edits and minio docs
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
dto "quyun/v2/app/http/super/v1/dto"
|
||||
"quyun/v2/app/requests"
|
||||
"quyun/v2/app/services"
|
||||
"quyun/v2/database/models"
|
||||
|
||||
"github.com/gofiber/fiber/v3"
|
||||
)
|
||||
@@ -70,3 +71,21 @@ func (c *notifications) ListTemplates(ctx fiber.Ctx, filter *dto.SuperNotificati
|
||||
func (c *notifications) CreateTemplate(ctx fiber.Ctx, form *dto.SuperNotificationTemplateCreateForm) (*dto.SuperNotificationTemplateItem, error) {
|
||||
return services.Super.CreateNotificationTemplate(ctx, form)
|
||||
}
|
||||
|
||||
// Update notification template
|
||||
//
|
||||
// @Router /super/v1/notifications/templates/:id<int> [patch]
|
||||
// @Summary Update notification template
|
||||
// @Description Update notification template
|
||||
// @Tags Notification
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path int64 true "Template ID"
|
||||
// @Param form body dto.SuperNotificationTemplateUpdateForm true "Update form"
|
||||
// @Success 200 {object} dto.SuperNotificationTemplateItem
|
||||
// @Bind user local key(__ctx_user)
|
||||
// @Bind id path
|
||||
// @Bind form body
|
||||
func (c *notifications) UpdateTemplate(ctx fiber.Ctx, user *models.User, id int64, form *dto.SuperNotificationTemplateUpdateForm) (*dto.SuperNotificationTemplateItem, error) {
|
||||
return services.Super.UpdateNotificationTemplate(ctx, user.ID, id, form)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user