mirror of
https://github.com/pushbits/server.git
synced 2025-04-28 17:56:50 +02:00
add tags and id
This commit is contained in:
parent
29fb096215
commit
98de0ef7e9
4 changed files with 26 additions and 0 deletions
|
@ -112,6 +112,8 @@ func (h *ApplicationHandler) updateApplication(ctx *gin.Context, a *model.Applic
|
|||
// CreateApplication godoc
|
||||
// @Summary Create Application
|
||||
// @Description Create a new application
|
||||
// @ID post-application
|
||||
// @Tags Application
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Param name query string true "Name of the application"
|
||||
|
@ -144,6 +146,8 @@ func (h *ApplicationHandler) CreateApplication(ctx *gin.Context) {
|
|||
// GetApplications godoc
|
||||
// @Summary Get Applications
|
||||
// @Description Get all applications from current user
|
||||
// @ID get-application
|
||||
// @Tags Application
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Success 200 {array} model.Application
|
||||
|
@ -167,6 +171,8 @@ func (h *ApplicationHandler) GetApplications(ctx *gin.Context) {
|
|||
// GetApplication godoc
|
||||
// @Summary Get Application
|
||||
// @Description Get single application by ID
|
||||
// @ID get-application-id
|
||||
// @Tags Application
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Param id path int true "ID of the application"
|
||||
|
@ -197,6 +203,8 @@ func (h *ApplicationHandler) GetApplication(ctx *gin.Context) {
|
|||
// DeleteApplication godoc
|
||||
// @Summary Delete Application
|
||||
// @Description Delete an application
|
||||
// @ID delete-application-id
|
||||
// @Tags Application
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Param id path int true "ID of the application"
|
||||
|
@ -224,6 +232,8 @@ func (h *ApplicationHandler) DeleteApplication(ctx *gin.Context) {
|
|||
// UpdateApplication godoc
|
||||
// @Summary Update Application
|
||||
// @Description Update an application
|
||||
// @ID put-application-id
|
||||
// @Tags Application
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Param id path int true "ID of the application"
|
||||
|
|
|
@ -13,6 +13,8 @@ type HealthHandler struct {
|
|||
|
||||
// Health godoc
|
||||
// @Summary Health of the application
|
||||
// @ID get-health
|
||||
// @Tags Health
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Success 200 ""
|
||||
|
|
|
@ -32,6 +32,8 @@ type NotificationHandler struct {
|
|||
// CreateNotification godoc
|
||||
// @Summary Create a Notification
|
||||
// @Description Creates a new notification for the given channel
|
||||
// @ID post-message
|
||||
// @Tags Application
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Param message query string true "The message to send"
|
||||
|
@ -73,6 +75,8 @@ func (h *NotificationHandler) CreateNotification(ctx *gin.Context) {
|
|||
// DeleteNotification godoc
|
||||
// @Summary Delete a Notification
|
||||
// @Description Informs the channel that the notification is deleted
|
||||
// @ID deöete-message-id
|
||||
// @Tags Application
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Param message_id path string true "ID of the message to delete"
|
||||
|
|
|
@ -116,6 +116,8 @@ func (h *UserHandler) updateUser(ctx *gin.Context, u *model.User, updateUser mod
|
|||
// This method assumes that the requesting user has privileges.
|
||||
// @Summary Create a User
|
||||
// @Description Creates a new user
|
||||
// @ID post-user
|
||||
// @Tags User
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Param name query string true "Name of the user"
|
||||
|
@ -153,6 +155,8 @@ func (h *UserHandler) CreateUser(ctx *gin.Context) {
|
|||
// This method assumes that the requesting user has privileges.
|
||||
// @Summary Get Users
|
||||
// @Description Gets a list of all users
|
||||
// @ID get-user
|
||||
// @Tags User
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Success 200 {object} []model.ExternalUser
|
||||
|
@ -178,6 +182,8 @@ func (h *UserHandler) GetUsers(ctx *gin.Context) {
|
|||
// This method assumes that the requesting user has privileges.
|
||||
// @Summary Get User
|
||||
// @Description Gets single user
|
||||
// @ID get-user-id
|
||||
// @Tags User
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Param id path integer true "The users id"
|
||||
|
@ -198,6 +204,8 @@ func (h *UserHandler) GetUser(ctx *gin.Context) {
|
|||
// This method assumes that the requesting user has privileges.
|
||||
// @Summary Delete User
|
||||
// @Description Delete user
|
||||
// @ID delete-user-id
|
||||
// @Tags User
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Param id path integer true "The users id"
|
||||
|
@ -236,6 +244,8 @@ func (h *UserHandler) DeleteUser(ctx *gin.Context) {
|
|||
// cannot give themselves privileges.
|
||||
// @Summary Update User
|
||||
// @Description Update user information
|
||||
// @ID put-user-id
|
||||
// @Tags User
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Param id path integer true "The users id"
|
||||
|
|
Loading…
Add table
Reference in a new issue