Skip to content

[API] endpoints to manage user/org/repo avatars #17115

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

Open
6543 opened this issue Sep 22, 2021 · 5 comments
Open

[API] endpoints to manage user/org/repo avatars #17115

6543 opened this issue Sep 22, 2021 · 5 comments
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@6543
Copy link
Member

6543 commented Sep 22, 2021

GET, SET, DELETE endpoints are needed

to simplify I would propose:

user

  • GET /users/{username}/avatar -> return raw image
  • PUT /users/{username}/avatar -> return status 204 (add img within request body)
  • DELETE /users/{username}/avatar -> return status 204 (rm and use default avatar)

org

  • GET /orgs/{org}/avatar -> return raw image
  • PUT /orgs/{org}/avatar -> return status 204 (add img within request body)
  • DELETE /orgs/{org}/avatar -> return status 204 (rm and use default avatar)

repo

  • GET /repos/{owner}/{repo}/avatar -> return raw image
  • PUT /repos/{owner}/{repo}/avatar -> return status 204 (add img within request body)
  • DELETE /repos/{owner}/{repo}/avatar -> return status 204 (rm and use default avatar)

ref: https://codeberg.org/gitnex/GitNex/issues/552

@6543 6543 added type/proposal The new feature has not been accepted yet but needs to be discussed first. modifies/api This PR adds API routes or modifies them labels Sep 22, 2021
@delvh
Copy link
Member

delvh commented Sep 22, 2021

I would say that this issue depends upon #17123 to be implemented the easiest.

@denyskon
Copy link
Member

denyskon commented Jul 1, 2023

Mostly implemented by #25369

@lunny
Copy link
Member

lunny commented Jul 3, 2023

Only GET missed?

@denyskon
Copy link
Member

denyskon commented Jul 3, 2023

Yes, and I think we only have the ability to set own user avatar, not for another user

@6543
Copy link
Member Author

6543 commented Oct 19, 2023

Yes, and I think we only have the ability to set own user avatar, not for another user

that's what only admins should do and what the sudo header is for

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
modifies/api This PR adds API routes or modifies them type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

4 participants