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

Call login API endpoint #858

Merged
merged 4 commits into from
Jan 27, 2025
Merged

Call login API endpoint #858

merged 4 commits into from
Jan 27, 2025

Conversation

marlonbaeten
Copy link
Contributor

@marlonbaeten marlonbaeten commented Jan 14, 2025

Fixes #710 and #711

The login form now actually calls the login API endpoint.
Also added development endpoints to create a user or to login (without any credentials).

To Test:

# run the backend
cd backend
sqlx database reset
cargo run -- --reset-database --seed-data

# run the frontend
cd frontend
npm run dev:server

Or visit: https://3dd96737538f666fcb09a792a1e760435de0414b.abacus-test.nl/

Go to /account/login and login using "user" and "password".

Copy link

github-actions bot commented Jan 27, 2025

Sigrid maintainability feedback

✅ You wrote maintainable code and achieved your objective of 3.5 stars

Show details

Sigrid compared your code against the baseline of 2025-01-27.

👍 What went well?

You fixed or improved 0 refactoring candidates.

👎 What could be better?

Unfortunately, 4 refactoring candidates were introduced or got worse.

Risk System property Location
🔴 Unit Size
(Worsened)
backend/src/lib.rs
router(SqlitePool)
🟡 Unit Size
(Introduced)
frontend/app/component/form/user/login/LoginForm.tsx
handleSubmit(FormEvent<HTMLFormElement>)
🟡 Unit Size
(Introduced)
frontend/app/component/error/ErrorModal.tsx
ErrorModal.tsx.ErrorModal(ErrorModalProps)
🟡 Module Coupling
(Worsened)
frontend/lib/api/ApiError.ts

📚 Remaining technical debt

3 refactoring candidates didn't get better or worse, but are still present in the code you touched.

View this system in Sigrid** to explore your technical debt

⭐️ Sigrid ratings

System property System on 2025-01-27 Before changes New/changed code
Volume 5.2 N/A N/A
Duplication 4.3 4.7 4.8
Unit Size 2.4 2.5 2.1
Unit Complexity 3.4 5.5 5.5
Unit Interfacing 2.9 4.1 4.1
Module Coupling 4.0 4.2 4.1
Component Independence 2.8 N/A N/A
Component Entanglement 3.6 N/A N/A
Maintainability 3.6 4.3 4.2

💬 Did you find this feedback helpful?

We would like to know your thoughts to make Sigrid better.
Your username will remain confidential throughout the process.


View this system in Sigrid

Co-authored-by: Ellen <lionqueen94@gmail.com>
cikzh
cikzh previously approved these changes Jan 27, 2025
@cikzh cikzh requested a review from Lionqueen94 January 27, 2025 13:43
Copy link
Contributor

@Lionqueen94 Lionqueen94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a small improvement to the rendering of the error alert, making sure the page does not scroll when there is an error and making sure the error cannot be closed (accidentally).

@marlonbaeten marlonbaeten added this pull request to the merge queue Jan 27, 2025
Merged via the queue into main with commit ff7f6c6 Jan 27, 2025
16 checks passed
@marlonbaeten marlonbaeten deleted the login-form branch January 27, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants