fix(api): renew endpoint uses get instead of post, correct @Accept docs

This commit is contained in:
yusing
2025-08-17 14:52:56 +08:00
parent e52c86e0b7
commit d1eb3470b5
8 changed files with 23 additions and 64 deletions

View File

@@ -22,7 +22,6 @@ type CertInfo struct {
// @Summary Get cert info
// @Description Get cert info
// @Tags cert
// @Accept json
// @Produce json
// @Success 200 {object} CertInfo
// @Failure 403 {object} apitypes.ErrorResponse

View File

@@ -17,13 +17,12 @@ import (
// @BasePath /api/v1
// @Summary Renew cert
// @Description Renew cert
// @Tags cert
// @Accept json
// @Produce json
// @Tags cert,websocket
// @Produce plain
// @Success 200 {object} apitypes.SuccessResponse
// @Failure 403 {object} apitypes.ErrorResponse
// @Failure 500 {object} apitypes.ErrorResponse
// @Router /cert/renew [post]
// @Router /cert/renew [get]
func Renew(c *gin.Context) {
autocert := config.GetInstance().AutoCertProvider()
if autocert == nil {