summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user/user.go
Commit message (Collapse)AuthorAgeFilesLines
* Swagger info corrections (#9441)65432019-12-201-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * use numbers and not http.Status___ enum * fix test * add many missing swagger responses * code format * Deletion Sould return 204 ... * error handling improvements * if special error type ... then add it to swagger too * one smal nit * invalidTopicsError is []string * valid swagger specification 2.0 - if you add responses swagger can tell you if you do it right :+1: * use ctx.InternalServerError * Revert "use numbers and not http.Status___ enum" This reverts commit b1ff386e2418ed6a7f183e756b13277d701278ef. * use http.Status* enum everywhere
* Move code.gitea.io/gitea/routers/api/v1/convert to ↵Lunny Xiao2019-11-101-1/+1
| | | | | | | | code.gitea.io/gitea/modules/convert (#8892) * Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert * fix fmt
* Fix 500 when getting user as unauthenticated user (#8653)Monty Taylor2019-10-241-1/+1
| | | | | | | | When doing GET /api/v1/users/{user} as an unauthenticated user, gitea throws a 500 because it's trying to dereference elements from the context user. It wants to do this to see whether to show the primary email and will do that if the logged in user is admin or the user in question. However, if ctx.User is nil, go gets really unhappy.
* Use gitea forked macaron (#7933)Tamal Saha2019-08-231-1/+1
| | | Signed-off-by: Tamal Saha <tamal@appscode.com>
* fix wrong email when use gitea as OAuth2 provider (#7640)renothing2019-07-271-6/+2
| | | | | | | when you use gitea as OAuth2 provider, the /api/v1/user should return user primary email as identifier, which is unique in OAuth2 clients. this patch use convert.ToUser replace all u.APIFormat in api requests, return primary email when caller is yourself or admin.
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-111-1/+1
| | | | | | | | | | | | * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Fixes #6881 - API users search fix (#6882)Richard Mahn2019-05-081-1/+1
|
* Return a UserList from /api/v1/admin/users (#6629)zeripath2019-04-151-11/+2
|
* fix bug user search API pagesize didn't obey ExplorePagingNum (#6579)Lunny Xiao2019-04-111-3/+0
|
* Updates to API 404 responses (#6077)John Olheiser2019-03-181-1/+1
|
* add isAdmin to user model (#6231)Lanre Adelowo2019-03-031-0/+1
| | | | | update vendor and add tests fix swagger
* Admins can now do unlimited page size user search (listAllUsers & ↵John Olheiser2019-02-211-1/+1
| | | | | listAllOrgs) (#6143) Non-admins will default to 10 page size
* User action heatmap (#5131)kolaente2018-10-231-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added basic heatmap data * Added extra case for sqlite * Built basic heatmap into user profile * Get contribution data from api & styling * Fixed lint & added extra group by statements for all database types * generated swagger spec * generated swagger spec * generated swagger spec * fixed swagger spec * fmt * Added tests * Added setting to enable/disable user heatmap * Added locale for loading text * Removed UseTiDB * Updated librejs & moment.js * Fixed import order * Fixed heatmap in postgresql * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-Authored-By: kolaente <konrad@kola-entertainments.de> * Added copyright header * Fixed a bug to show the heatmap for the actual user instead of the currently logged in * Added integration test for heatmaps * Added a heatmap on the dashboard * Fixed timestamp parsing * Hide heatmap on mobile * optimized postgresql group by query * Improved sqlite group by statement
* Fix Swagger JSON autogeneration issues. (#4845)zeripath2018-10-201-0/+1
| | | | | | | | | | | | | | | | | | | | | * Fix Swagger JSON. Remove unnecessary schema references for the forbidden and empty responses Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix swagger API for CreateAccessToken * Fix admin create org swagger * Fix swagger for adminCreateRepo * More swagger fixes Set int64 format for those which are int64 Some more form fixes * Fix swagger description of GET /repos/{owner}/{repo}/pulls
* Add support for search by uid (#4876)zeripath2018-10-181-0/+5
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update Swagger API to match the return of /users/search (#4847)zeripath2018-09-211-1/+10
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Respect email privacy option in user search via API (#4512)Lanre Adelowo2018-07-251-1/+1
| | | | | | * respect user's email privacy option * make email visible to admin irrespective of privacy option
* Update swagger documentation (#2899)Ethan Koenig2017-11-131-28/+42
| | | | | | | | | | | * Update swagger documentation Add docs for missing endpoints Add documentation for request parameters Make parameter naming consistent Fix response documentation * Restore delete comments
* fix importsLunny Xiao2017-10-251-5/+4
|
* some fixesLunny Xiao2017-10-251-1/+2
|
* Hide unactive on explore users and some refactors (#2741)Lunny Xiao2017-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * hide unactive on explore users and some refactors * fix test for removed Organizations * fix test for removed Organizations * fix imports * fix logic bug * refactor the toConds * Rename TestOrganizations to TestSearchUsers and add tests for users * fix other tests * fix other tests * fix watchers tests * fix comments and remove unused code
* Improve swagger doc (#2274)Antoine GIRARD2017-08-211-3/+3
| | | | | | | | | | | | | | | | | | | | * Add swagger comment for adminCreateOrg * Add swagger comment for admin route * add hook swagger doc * Add tags * Add auth * Fix name of responses * Edit name method * Update vendor * make generate-swagger
* Generate swagger json (#1402)Antoine GIRARD2017-05-021-0/+27
| | | | | | | - Generate swagger.json into public/ - Add swagger-ui auto-installation - Add footer link to local swagger-ui - Add /swagger url for using app url. - Fix Swagger-UI version via git tag
* fix: trim the whitespaces for the search keyword (#893)Bo-Yi Wu2017-02-111-1/+3
|
* Fix breakage from vendor-updateKim "BKC" Carlbäcker2016-11-291-1/+1
|
* golint fixed for routers (#208)Lunny Xiao2016-11-241-0/+3
|
* Fix import path of go-sdk (#141)Sandro Santilli2016-11-111-1/+1
| | | | From code.gitea.io/go-sdk/gitea To code.gitea.io/sdk/gitea
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-3/+3
| | | | | | | - Update import paths from github.com/go-gitea to code.gitea.io - Fix import path for travis See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
* And othersSandro Santilli2016-11-071-1/+1
|
* Replaced go-gogs-client with go-sdk importsThomas Boerger2016-11-071-1/+1
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-2/+2
|
* Replace convert.To with APIFormat callsUnknwon2016-08-141-3/+2
|
* Fix #3391Unknwon2016-08-111-3/+6
|
* Refactor User.Id to User.IDUnknwon2016-07-241-2/+2
|
* Convert all API handers to use *context.APIContextUnknwon2016-03-131-4/+4
|
* #13 finish user and repository searchUnknwon2016-03-111-13/+14
| | | | Both are possible on explore and admin panel
* Rename module: middleware -> contextUnknwon2016-03-111-3/+3
|
* refactor API routes and some work for #976Unknwon2015-12-041-0/+71