File tree Expand file tree Collapse file tree 4 files changed +15
-53
lines changed
internal/sms-gateway/handlers/settings Expand file tree Collapse file tree 4 files changed +15
-53
lines changed Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ func (h *ThirdPartyController) get(user models.User, c *fiber.Ctx) error {
5252 return c .JSON (settings )
5353}
5454
55- // @Summary Update settings
56- // @Description Updates settings for a specific user
55+ // @Summary Replace settings
56+ // @Description Replaces settings
5757// @Security ApiAuth
5858// @Tags User, Settings
5959// @Accept json
Original file line number Diff line number Diff line change @@ -29,15 +29,15 @@ type MobileController struct {
2929 settingsSvc * settings.Service
3030}
3131
32- // @Summary Get settings
33- // @Description Returns settings for a device
34- // @Security MobileToken
35- // @Tags Device, Settings
36- // @Produce json
37- // @Success 200 {object} smsgateway.DeviceSettings "Settings"
38- // @Failure 401 {object} smsgateway.ErrorResponse "Unauthorized"
39- // @Failure 500 {object} smsgateway.ErrorResponse "Internal server error"
40- // @Router /mobile/v1/settings [get]
32+ // @Summary Get settings
33+ // @Description Returns settings for a device
34+ // @Security MobileToken
35+ // @Tags Device, Settings
36+ // @Produce json
37+ // @Success 200 {object} smsgateway.DeviceSettings "Settings"
38+ // @Failure 401 {object} smsgateway.ErrorResponse "Unauthorized"
39+ // @Failure 500 {object} smsgateway.ErrorResponse "Internal server error"
40+ // @Router /mobile/v1/settings [get]
4141//
4242// Get settings
4343func (h * MobileController ) get (device models.Device , c * fiber.Ctx ) error {
Original file line number Diff line number Diff line change 436436 "ApiAuth" : []
437437 }
438438 ],
439- "description" : " Updates settings for a specific user " ,
439+ "description" : " Replaces settings" ,
440440 "consumes" : [
441441 " application/json"
442442 ],
447447 " User" ,
448448 " Settings"
449449 ],
450- "summary" : " Update settings" ,
450+ "summary" : " Replace settings" ,
451451 "parameters" : [
452452 {
453453 "description" : " Settings" ,
11841184 }
11851185 ]
11861186 },
1187- "gateway" : {
1188- "description" : " Gateway contains settings related to the Cloud/Private server configuration." ,
1189- "allOf" : [
1190- {
1191- "$ref" : " #/definitions/smsgateway.SettingsGateway"
1192- }
1193- ]
1194- },
11951187 "logs" : {
11961188 "description" : " Logs contains settings related to logging." ,
11971189 "allOf" : [
18481840 }
18491841 }
18501842 },
1851- "smsgateway.SettingsGateway" : {
1852- "type" : " object" ,
1853- "properties" : {
1854- "cloud_url" : {
1855- "description" : " CloudURL is the URL of the server. If nil, the Cloud Public server is used.\n Must be a valid HTTPs URL when provided." ,
1856- "type" : " string"
1857- },
1858- "private_token" : {
1859- "description" : " PrivateToken is the private token for authenticating with the Private Server." ,
1860- "type" : " string"
1861- }
1862- }
1863- },
18641843 "smsgateway.SettingsLogs" : {
18651844 "type" : " object" ,
18661845 "properties" : {
Original file line number Diff line number Diff line change @@ -32,11 +32,6 @@ definitions:
3232 allOf :
3333 - $ref : ' #/definitions/smsgateway.SettingsEncryption'
3434 description : Encryption contains settings related to message encryption.
35- gateway :
36- allOf :
37- - $ref : ' #/definitions/smsgateway.SettingsGateway'
38- description : Gateway contains settings related to the Cloud/Private server
39- configuration.
4035 logs :
4136 allOf :
4237 - $ref : ' #/definitions/smsgateway.SettingsLogs'
@@ -520,18 +515,6 @@ definitions:
520515 is disabled.
521516 type : string
522517 type : object
523- smsgateway.SettingsGateway :
524- properties :
525- cloud_url :
526- description : |-
527- CloudURL is the URL of the server. If nil, the Cloud Public server is used.
528- Must be a valid HTTPs URL when provided.
529- type : string
530- private_token :
531- description : PrivateToken is the private token for authenticating with the
532- Private Server.
533- type : string
534- type : object
535518 smsgateway.SettingsLogs :
536519 properties :
537520 lifetime_days :
@@ -987,7 +970,7 @@ paths:
987970 put :
988971 consumes :
989972 - application/json
990- description : Updates settings for a specific user
973+ description : Replaces settings
991974 parameters :
992975 - description : Settings
993976 in : body
@@ -1016,7 +999,7 @@ paths:
1016999 $ref : ' #/definitions/smsgateway.ErrorResponse'
10171000 security :
10181001 - ApiAuth : []
1019- summary : Update settings
1002+ summary : Replace settings
10201003 tags :
10211004 - User
10221005 - Settings
You can’t perform that action at this time.
0 commit comments