Skip to content

Commit 5ed38ae

Browse files
committed
as per @zeripath "preferences" -> "settings"
1 parent a4b40a2 commit 5ed38ae

File tree

3 files changed

+44
-44
lines changed

3 files changed

+44
-44
lines changed

routers/api/v1/api.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ func Routes() *web.Route {
649649

650650
m.Group("/user", func() {
651651
m.Get("", user.GetAuthenticatedUser)
652-
m.Group("/preferences", func() {
652+
m.Group("/settings", func() {
653653
m.Get("", user.GetUserSettings)
654654
m.Patch("", bind(api.UserSettingsOptions{}), user.UpdateUserSettings)
655655
}, reqToken())

routers/api/v1/user/preferences.go routers/api/v1/user/settings.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616

1717
// GetUserSettings returns user settings
1818
func GetUserSettings(ctx *context.APIContext) {
19-
// swagger:operation GET /user/preferences user getUserSettings
19+
// swagger:operation GET /user/settings user getUserSettings
2020
// ---
2121
// summary: Get user settings
2222
// produces:
@@ -29,7 +29,7 @@ func GetUserSettings(ctx *context.APIContext) {
2929

3030
// UpdateUserSettings returns user settings
3131
func UpdateUserSettings(ctx *context.APIContext) {
32-
// swagger:operation PATCH /user/preferences user updateUserSettings
32+
// swagger:operation PATCH /user/settings user updateUserSettings
3333
// ---
3434
// summary: Update user settings
3535
// parameters:

templates/swagger/v1_json.tmpl

+41-41
Original file line numberDiff line numberDiff line change
@@ -10736,47 +10736,6 @@
1073610736
}
1073710737
}
1073810738
},
10739-
"/user/preferences": {
10740-
"get": {
10741-
"produces": [
10742-
"application/json"
10743-
],
10744-
"tags": [
10745-
"user"
10746-
],
10747-
"summary": "Get user settings",
10748-
"operationId": "getUserSettings",
10749-
"responses": {
10750-
"200": {
10751-
"$ref": "#/responses/UserSettings"
10752-
}
10753-
}
10754-
},
10755-
"patch": {
10756-
"produces": [
10757-
"application/json"
10758-
],
10759-
"tags": [
10760-
"user"
10761-
],
10762-
"summary": "Update user settings",
10763-
"operationId": "updateUserSettings",
10764-
"parameters": [
10765-
{
10766-
"name": "body",
10767-
"in": "body",
10768-
"schema": {
10769-
"$ref": "#/definitions/UserSettingsOptions"
10770-
}
10771-
}
10772-
],
10773-
"responses": {
10774-
"200": {
10775-
"$ref": "#/responses/UserSettings"
10776-
}
10777-
}
10778-
}
10779-
},
1078010739
"/user/repos": {
1078110740
"get": {
1078210741
"produces": [
@@ -10842,6 +10801,47 @@
1084210801
}
1084310802
}
1084410803
},
10804+
"/user/settings": {
10805+
"get": {
10806+
"produces": [
10807+
"application/json"
10808+
],
10809+
"tags": [
10810+
"user"
10811+
],
10812+
"summary": "Get user settings",
10813+
"operationId": "getUserSettings",
10814+
"responses": {
10815+
"200": {
10816+
"$ref": "#/responses/UserSettings"
10817+
}
10818+
}
10819+
},
10820+
"patch": {
10821+
"produces": [
10822+
"application/json"
10823+
],
10824+
"tags": [
10825+
"user"
10826+
],
10827+
"summary": "Update user settings",
10828+
"operationId": "updateUserSettings",
10829+
"parameters": [
10830+
{
10831+
"name": "body",
10832+
"in": "body",
10833+
"schema": {
10834+
"$ref": "#/definitions/UserSettingsOptions"
10835+
}
10836+
}
10837+
],
10838+
"responses": {
10839+
"200": {
10840+
"$ref": "#/responses/UserSettings"
10841+
}
10842+
}
10843+
}
10844+
},
1084510845
"/user/starred": {
1084610846
"get": {
1084710847
"produces": [

0 commit comments

Comments
 (0)