api/v1/akkoma/preferred_frontend*
s have path prefix duplicated #604
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#604
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Your setup
From source
Extra details
(actually no own server atm but that wasn't an option to select; I was looking through the code since besides the prometheus endpoint no akkoma-specifc API is documented. I verified this behaviour on some public instances on 3.9.3. If it helps debugging in anyway I can try to spin up a local test instance.)
Version
tested servers on 3.9.3; code still seems affected as of git HEAD
33e7ae7637
PostgreSQL version
What were you trying to do?
Commit
3d964a9970
added REST API endpoints for listing and selecting the available/prefered frontend. However it accidentally duplicated the/api/v1/akkoma/
prefix inlib/pleroma/web/router.ex
, so the API endpoints are now actually available under/api/v1/akkoma/api/v1/akkoma/preferred_frontend(/available)
instead of/api/v1/akkoma/preferred_frontend(/available)
.No other endpoint in
router.ex
duplicates the scope into theput
/post
/get
part afaict.A further note, while I’m able to use the
PUT /api/v1/akkoma/api/v1/akkoma/preferred_frontend
to select a frontend an the expectedSet-Cookie
header is snet in the response. I cannot getGET /api/v1/akkoma//api/v1/akkoma/preferred_frontend/available
to list anything; see logs for what it returns instead.Adding a
frontend_name
parameter to the request doesn't change the response. But perhaps I’m missing something obvious and the listing not working is my fault.The web interface under
akkoma/frontend
(added two commits later inde64c6c54a
) works as expected, including listing (a single) available frontend.What did you expect to happen?
API endpoints being
GET /api/v1/akkoma/preferred_frontend/available
andPUT /api/v1/akkoma/preferred_frontend
and listing available frontends working without any additional parameters.What actually happened?
see “What were you trying to do?”
Logs
Severity
I can manage (just wanted to let you know since this doesn't seem intentional)
Have you searched for this issue?
sorry im stupid
fixed