loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update API to return 'source_id' for users (#29718)

Using the API, a user's _source_id_ can be set in the _CreateUserOption_
model, but the field is not returned in the _User_ model.

This PR updates the _User_ model to include the field _source_id_ (The
ID of the Authentication Source).

(cherry picked from commit 58b204b813cd3a97db904d889d552e64a7e398ff)

authored by

Tobias Balle-Petersen and committed by
Gergely Nagy
23f032ea 3662829c

+9
+2
modules/structs/user.go
··· 19 19 // the user's authentication sign-in name. 20 20 // default: empty 21 21 LoginName string `json:"login_name"` 22 + // The ID of the user's Authentication Source 23 + SourceID int64 `json:"source_id"` 22 24 // the user's full name 23 25 FullName string `json:"full_name"` 24 26 // swagger:strfmt email
+1
services/convert/user.go
··· 76 76 if authed { 77 77 result.IsAdmin = user.IsAdmin 78 78 result.LoginName = user.LoginName 79 + result.SourceID = user.LoginSource 79 80 result.LastLogin = user.LastLoginUnix.AsTime() 80 81 result.Language = user.Language 81 82 result.IsActive = user.IsActive
+6
templates/swagger/v1_json.tmpl
··· 24672 24672 "type": "boolean", 24673 24673 "x-go-name": "Restricted" 24674 24674 }, 24675 + "source_id": { 24676 + "description": "The ID of the user's Authentication Source", 24677 + "type": "integer", 24678 + "format": "int64", 24679 + "x-go-name": "SourceID" 24680 + }, 24675 24681 "starred_repos_count": { 24676 24682 "type": "integer", 24677 24683 "format": "int64",