-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement ApiClient for all endpoints #18
Conversation
f55ff3a
to
3a6ccc4
Compare
Change delete endpoints to only take the id of the object to delete. Change delete endpoints to use the HTTP DELETE method. Add protocol objects to the frontend for talking to the backend. Use kotlin coroutines instead of callbacks for the ApiClient. Create tests that connect to http://localhost:3000 and tests with the backend.
3a6ccc4
to
cf74d68
Compare
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.
Axum is amazing 😄
|
||
#[derive(Deserialize, Serialize)] | ||
pub struct DeleteDeviceRequest { | ||
pub id: i64, |
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.
Is this the device' id?
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.
Yes it matches the name in the device struct
|
||
#[derive(Deserialize, Serialize)] | ||
pub struct DeleteTaskRequest { | ||
pub id: i64, |
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.
Is this the tasks' id?
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.
Yes it matches the name in the task struct
Change delete endpoints to only take the id of the object to delete. Change delete endpoints to use the HTTP DELETE method.
Add protocol objects to the frontend for talking to the backend. Use kotlin coroutines instead of callbacks for the ApiClient.
Create tests that connect to http://localhost:3000 and tests with the backend.