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:
phoenix
2025-11-13 21:45:17 +00:00
committed by phoenix
parent 0cd71c5506
commit f69d56f527
14 changed files with 2597 additions and 23 deletions
@@ -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)