Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API routes added #5594

Merged
merged 17 commits into from
Jan 23, 2019
Merged

New API routes added #5594

merged 17 commits into from
Jan 23, 2019

Conversation

shashvat-kedia
Copy link
Contributor

Fix to Issue #4387

New API routes added
GET api/v1/admin/users/{username}/orgs
GET api/v1/admin/orgs
GET api/v1/admin/users

@shashvat-kedia
Copy link
Contributor Author

@lunny I have implemented the new routes as proposed by @cleverer in #4387

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 25, 2018
models/user.go Outdated Show resolved Hide resolved
routers/api/v1/admin/org.go Outdated Show resolved Hide resolved
routers/api/v1/admin/user.go Outdated Show resolved Hide resolved
@shashvat-kedia
Copy link
Contributor Author

@lafriks I have added the appropriate comments. But the DronCI build still tends to fail the error states that I have to commit the files after executing make generate-swagger but this I have already done and have commit the files but am still receiving the same error. Could you help me with this? Thanks.

@lafriks lafriks added type/enhancement An improvement of existing functionality modifies/api This PR adds API routes or modifies them labels Dec 25, 2018
@lafriks
Copy link
Member

lafriks commented Dec 25, 2018

You must still remove newline from swagger/v1_json.tmpl file

@codecov-io
Copy link

codecov-io commented Dec 26, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@b9f8737). Click here to learn what that means.
The diff coverage is 16.36%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5594   +/-   ##
=========================================
  Coverage          ?   37.85%           
=========================================
  Files             ?      328           
  Lines             ?    48240           
  Branches          ?        0           
=========================================
  Hits              ?    18263           
  Misses            ?    27347           
  Partials          ?     2630
Impacted Files Coverage Δ
routers/api/v1/admin/org.go 0% <0%> (ø)
routers/api/v1/admin/user.go 22.47% <0%> (ø)
routers/api/v1/api.go 73.76% <100%> (ø)
models/user.go 48.19% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9f8737...af85b4f. Read the comment docs.

@shashvat-kedia
Copy link
Contributor Author

@lafriks I have fixed it.

@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 26, 2018
models/user.go Outdated Show resolved Hide resolved
routers/api/v1/admin/org.go Outdated Show resolved Hide resolved
routers/api/v1/admin/user.go Outdated Show resolved Hide resolved
@shashvat-kedia
Copy link
Contributor Author

@kolaente I have made the changes.

models/user.go Outdated Show resolved Hide resolved
@shashvat-kedia
Copy link
Contributor Author

@lafriks I have made the changes.

@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 29, 2018
@shashvat-kedia
Copy link
Contributor Author

@lafriks Is there anything left to be fixed in this PR?

models/user.go Outdated Show resolved Hide resolved
@techknowlogick techknowlogick merged commit 1b90692 into go-gitea:master Jan 23, 2019
@zeripath
Copy link
Contributor

Peeps we keep adding APIs but not tests to go with them!

@lunny
Copy link
Member

lunny commented Jan 24, 2019

Yes, integration tests should be a necessary with PRs when send a PR about APIs.

bmackinney pushed a commit to bmackinney/gitea that referenced this pull request Jan 27, 2019
* New API routes added

* Comments added

* Build fix

* swagger_v1_json.tmpl without new line character

* Typo fix

* Code review changes

* Code review changes

* Add copyright

* Add copyright

* Add copyright

* Update per @lafriks feedback

* Update org.go

* Update user.go

* Update user.go

* make fmt
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants