LudwigJMarx commented on issue #4214:
URL: https://github.com/apache/iggy/issues/4214#issuecomment-5712028442

   I'll take this. PR after #4212, checked against `openapi.json`.
   
   Three findings.
   
   **The logout fix has to touch two places.** `/users/logout` is declared 
twice as
   `POST`: `Users` line 28 and `Auth` lines 166-169. `BaseApiSchema` is a 
union, so
   `POST /users/logout` stays well typed as long as one branch admits it.
   `/users/login` is duplicated the same way. I'd drop both duplicates from 
`Users`
   and keep `Auth` as the only place for auth routes, next to `refresh-token`. 
Tell
   me if you'd rather keep them.
   
   **`options` left out of the update body.** `UPDATABLE_USER_OPTION_KEYS` is 
empty
   (`core/common/src/types/options/mod.rs:483`) and `update_user` validates 
against
   it (`core/server/src/http/handlers.rs:1674`), so every key is rejected by 
name
   and the field can only carry `{}`. Tell me if you want it declared anyway.
   
   **CI does not typecheck `web/`.** The `web-ui` component runs `lint`, `test` 
and
   `build` (`.github/config/components.yml:529`). `npm run check` is not in that
   list. With a deliberate type error in `web/src/lib/api/fetchRouteApi.ts`:
   
   | command | result |
   | --- | --- |
   | `npm run check` | 1 error |
   | `npm run lint` | pass |
   | `npm test` | 2 pass, 0 fail |
   | `npm run build` | pass |
   
   `npm run check` is clean on master (0 errors, 24 warnings), so adding it to 
the
   component's tasks passes as is. Separate PR if you want it.
   
   Your logout question: `authStore.logout()` clears the cookie only, and 
nothing
   in `web/src` calls `/users/logout` or `/users/{id}/permissions`.
   `EditUserModal.svelte` and `EditUserPermissionsModal.svelte` are both empty.
   Calling the server on logout is a behavior change, not a type fix. Separate 
PR
   if wanted.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to