SEP-VIA-GROUP5 / SEP6

6th Semester Project
0 stars 1 forks source link

Create basic crud controllers #44

Closed rycka13 closed 1 year ago

rycka13 commented 1 year ago

(Services will be updated when all CRUD methods from database are created)

Movies controller:

CREATE method: {URL}/movie/save takes 'Movie' object returns 200 on success and 400 on bad request

GET method: {URL}/movie/getAll takes: nothing returns: 'List'

GET method: {URL}/movie/movieId/{movieId} takes: 'int' movie id returns: one 'Movie' with that id

PUT method: {URL}/movie/movieId/{movieId} takes: 'int' movie id and 'Movie' updated movie object returns: 200 if success and 400 if bad request

DELETE method: {URL}/movie/movieId/{movieId} takes: 'int' movie id returns: 200 if success and 400 if bad request

All other controllers follow the same pattern. For example: if you want to getAll for starts: {URL}/star/getAll, same for PUT method: {URL}/star/starId/{starId} . It takes 'Star' object instead of 'Movie' object