Skip to content

Commit

Permalink
as per @zeripath "preferences" -> "settings"
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Jun 17, 2021
1 parent a4b40a2 commit 5ed38ae
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion routers/api/v1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ func Routes() *web.Route {

m.Group("/user", func() {
m.Get("", user.GetAuthenticatedUser)
m.Group("/preferences", func() {
m.Group("/settings", func() {
m.Get("", user.GetUserSettings)
m.Patch("", bind(api.UserSettingsOptions{}), user.UpdateUserSettings)
}, reqToken())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

// GetUserSettings returns user settings
func GetUserSettings(ctx *context.APIContext) {
// swagger:operation GET /user/preferences user getUserSettings
// swagger:operation GET /user/settings user getUserSettings
// ---
// summary: Get user settings
// produces:
Expand All @@ -29,7 +29,7 @@ func GetUserSettings(ctx *context.APIContext) {

// UpdateUserSettings returns user settings
func UpdateUserSettings(ctx *context.APIContext) {
// swagger:operation PATCH /user/preferences user updateUserSettings
// swagger:operation PATCH /user/settings user updateUserSettings
// ---
// summary: Update user settings
// parameters:
Expand Down
82 changes: 41 additions & 41 deletions templates/swagger/v1_json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10736,47 +10736,6 @@
}
}
},
"/user/preferences": {
"get": {
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Get user settings",
"operationId": "getUserSettings",
"responses": {
"200": {
"$ref": "#/responses/UserSettings"
}
}
},
"patch": {
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Update user settings",
"operationId": "updateUserSettings",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/UserSettingsOptions"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/UserSettings"
}
}
}
},
"/user/repos": {
"get": {
"produces": [
Expand Down Expand Up @@ -10842,6 +10801,47 @@
}
}
},
"/user/settings": {
"get": {
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Get user settings",
"operationId": "getUserSettings",
"responses": {
"200": {
"$ref": "#/responses/UserSettings"
}
}
},
"patch": {
"produces": [
"application/json"
],
"tags": [
"user"
],
"summary": "Update user settings",
"operationId": "updateUserSettings",
"parameters": [
{
"name": "body",
"in": "body",
"schema": {
"$ref": "#/definitions/UserSettingsOptions"
}
}
],
"responses": {
"200": {
"$ref": "#/responses/UserSettings"
}
}
}
},
"/user/starred": {
"get": {
"produces": [
Expand Down

0 comments on commit 5ed38ae

Please sign in to comment.