tsk-35: Add API documentation (#39)
Closes #35 Reviewed-on: phoenix/textsender-api#39 Co-authored-by: phoenix <kundeng00@pm.me> Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
@@ -33,6 +33,19 @@ func NewScheduledMessageStatusHandler(str store.ScheduledMessageEventStore, schS
|
||||
return &ScheduledMessageStatusHandler{ScheduledMessageEventStore: str, ScheduledMessageStore: schStore}
|
||||
}
|
||||
|
||||
// UpdateStatus godoc
|
||||
// @Summary Update status
|
||||
// @Description Update the status of a scheduled message (requires JWT)
|
||||
// @Tags status
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security BearerAuth
|
||||
// @Param request body RequestScheduledMessageStatus true "Used to update scheduled message status"
|
||||
// @Success 201 {object} ScheduledMessageStatusResponse
|
||||
// @Failure 400 {object} ScheduledMessageStatusResponse
|
||||
// @Failure 404 {object} ScheduledMessageStatusResponse
|
||||
// @Failure 500 {object} ScheduledMessageStatusResponse
|
||||
// @Router /schedule/message/status/update [patch]
|
||||
func (s *ScheduledMessageStatusHandler) UpdateStatus(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodPatch {
|
||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
||||
|
||||
Reference in New Issue
Block a user