-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feat: Todo List REST API
#53
Labels
Comments
15 tasks
3 tasks
@LuchoTurtle assigning this to you. But if anything is unclear please comment. 💬 🙏 |
3 tasks
@LuchoTurtle please see: dwyl/hits#168 🔗 |
LuchoTurtle
moved this from 🔖 Ready for Development
to 🏗 In progress
in dwyl app kanban
Dec 12, 2022
LuchoTurtle
added a commit
that referenced
this issue
Dec 12, 2022
Merged
LuchoTurtle
added a commit
that referenced
this issue
Dec 13, 2022
LuchoTurtle
added a commit
that referenced
this issue
Dec 13, 2022
LuchoTurtle
added a commit
that referenced
this issue
Dec 13, 2022
LuchoTurtle
added a commit
that referenced
this issue
Dec 13, 2022
LuchoTurtle
added a commit
that referenced
this issue
Dec 13, 2022
LuchoTurtle
added a commit
that referenced
this issue
Dec 14, 2022
LuchoTurtle
added a commit
that referenced
this issue
Dec 14, 2022
github-project-automation
bot
moved this from ⏳Awaiting Review
to ✅ Done
in dwyl app kanban
Dec 30, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Once deployed to Fly.io with CI/CD #52 and
auth
is added #37we should add a basic
REST API
endpoint toCRUD
Todo List items.Why?
As part of building a full-stack App using our chosen Tech Stack https://github.com/dwyl/technology-stack#the-petal-stack
We want to build the backend API in
Phoenix
.This mini tutorial is the perfect place to showcase building such an API because all the ground-work is already done for Todo list
items
.Todo
api_controller.ex
forCRUD
-ing theTodo
listitems
(you can use:pipe_through :json
).Creating
anew
todo listitem
and test it viacURL
(orPostman
)JSON
payload with the necessary data, e.g:person_id
(Int
)status
(Int
)text
(String
)phoenix-todo-list-tutorial/lib/app/todo/item.ex
Lines 5 to 8 in e945ed2
Should create a new Todo
item
if the data is validCreate a
REST API
Endpoint forediting
theTodo
listitem.text
:POST /items/:id/
item.id
(Int
) anditem.text
(String
) and return200
if successful. 🆗Create
REST API
Endpoint for Updating thestatus
of theitem
i.e. setting it to "done" ✅Relevant Learning
Please read: https://github.com/dwyl/phoenix-content-negotiation-tutorial 👀
And if you have any questions regarding content negotiation please open an issue. 🆕
For
this
project we don't need to have all the same routes we just need:The text was updated successfully, but these errors were encountered: