-
Notifications
You must be signed in to change notification settings - Fork 582
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
refactor(site): use axios in non-swr endpoints #460
Conversation
Codecov Report
@@ Coverage Diff @@
## main #460 +/- ##
==========================================
+ Coverage 67.74% 68.17% +0.42%
==========================================
Files 160 157 -3
Lines 9265 9078 -187
Branches 83 79 -4
==========================================
- Hits 6277 6189 -88
+ Misses 2363 2288 -75
+ Partials 625 601 -24
Continue to review full report at Codecov.
|
const payload = JSON.stringify({ | ||
email, | ||
password, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how streamlined these are - nice refactoring!
I like the idea of I can imagine a dir structure like this (just thinking out loud):
where each file defines its own axios instance and functions: // coderapi.ts
export const CoderAPI = axios.create( ... )
export const login = (....) => {
const response = CoderAPI.post(...)
return response.data
} |
Summary
Applies axios to login, logout and getApiKey
Impact
POC of axios (#453) and testing axios
Additional details
test:watch
script (port from v1 for improved test workflow)resolves: #453