hotmandu / CS350-BookSwap-Backend

CS350 2024 Spring Project
0 stars 0 forks source link

List of API endpoints #1

Open hotmandu opened 6 months ago

hotmandu commented 6 months ago

/auth/signin email: user email, password: hashed password /auth/register name, email, password, location == user_token == /shelf/add isbn /shelf/remove book_id /books/search?options /request/send /request/list/sent /request/list/received /request/list/ongoing /request/respond?accepted or declined /request/terminate /chat/messages /chat/send

nt-hn commented 5 months ago

Please refer to the README to check for the updated endpoints and their responses as well as parameters for the endpoints.

hotmandu commented 5 months ago

Please refer to the README to check for the updated endpoints and their responses as well as parameters for the endpoints.

I think once we implement APIs for exhange requests, API for chatrooms become redundant, as each request's id could be used as id for a chatroom. Or do we have other usecases of chatroom API?

nt-hn commented 5 months ago

I think chatrooms are going to be used for sharing information about mailing locations

hotmandu commented 5 months ago

Since we merged the concept of requests into the model of books, we're good with the current design I think. FYI, what I thought is we have a separate model for requests so we could use request objects' ID to distinguish chatrooms.

nt-hn commented 5 months ago

Good point, as a work around what we can do now is when the status of the book is ongoing we can create a chat with the two users. The chat will have it's own id which can then be used to delete it after the swap is completed.