Web UI: ApiSchema.ts doesn't match the server's HTTP routes for logout and user updates
Maintainer thường phản hồi trong vòng 2 ngày
@princecherry9905 đang làm issue này rồi.
Từ ngày 19/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Bug description
web/src/lib/api/ApiSchema.ts is a hand-written list of the HTTP routes the Web UI calls, and three entries don't match the server's HTTP API (core/server/src/http.rs and core/server/src/http/handlers.rs):
- Logout is declared as
POST /users/logout. The server route isDELETE /users/logout. - There is a
GET /users/{id}entry with a request body ofusername,statusandpermissions. The server's update route isPUT /users/{id}, and its body (UpdateUser) takesusername,statusandoptions.permissionsis ignored; permissions are changed withPUT /users/{id}/permissions. - The
PUT /users/{id}/permissionsentry makespermissionsrequired. The server accepts it as null or missing, which removes all of the user's permissions.
The logout route moved from POST to DELETE in #889 (April 2024), a year before the Web UI was brought into this repo in #1739, and the type list was never updated. None of these entries is used yet: the Edit user modal is a placeholder, and nothing calls logout or the permissions route. They would fail once user editing is built on them.
Separately, the Web UI's logout (authStore.logout() in web/src/lib/auth/authStore.svelte.ts) only clears the token cookie and never calls the server, so the server-side session stays open. The server's logout ends the session but doesn't revoke the token, which stays valid until it expires. Is calling DELETE /users/logout on logout wanted?
This should wait until #4212 is merged. It adds core/server/openapi.json, a description of every HTTP route that is kept in step with the server by a test, so the fix can check the Web UI's entries against it, or generate them from it, rather than reading the Rust code.
Affected area / component
Web UI
Deployment
Not applicable
Versions
The current default branch.
Reproduction
Compare the entries in web/src/lib/api/ApiSchema.ts with the routes in core/server/src/http.rs and the request types in core/common/src/http/users/.
Contribution
- I'm willing to submit a pull request to fix this bug
Good first issue
- I think this could be a good first issue for a new contributor
- Ngôn ngữ chính
- Rust
- Star
- 5.3k
- Fork
- 548
- Merge trung bình
- 2 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 194
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/iggy
-
go good first issue test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
-
go good first issue test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 2 ngày
-
go good first issue test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
-
good first issue java test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 2 ngày
-
good first issue javascript test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 2 ngày
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
code-quality parser
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
eventflux-io/eventflux#218 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
StartSso docs say an option requires the built-in AuthnRequest renderer, which is now the only oneĐang mởdocumentation needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
marketing
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày