Commit Graph

20 Commits

Author SHA1 Message Date
Maxime Delporte
fc2e401f6f Adding sorting lists.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 58s
2025-11-14 17:31:29 +01:00
Maxime Delporte
0d1062d995 Adding full-text search. 2025-11-13 18:52:59 +01:00
Maxime Delporte
1b71a1a8ad Creating GetAll MovieModel method to retrieve all movies. Updating the listMovieHandler to use the new GetAll MovieModel's method.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 59s
2025-11-13 15:25:00 +01:00
Maxime Delporte
95d9de60b4 Adding ValidateFilters method in filters.go and use it in our listMoviesHandler 2025-11-12 11:09:57 +01:00
Maxime Delporte
bf7c53e565 Creating Filters struct and using it inside our listMoviesHandler 2025-11-11 10:47:25 +01:00
Maxime Delporte
0ba997475b Updating database model with 3-second timeout deadline for all our operations.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 58s
2025-11-10 17:00:06 +01:00
Maxime Delporte
5413312875 Adding a query timeout. 2025-11-10 16:45:42 +01:00
Maxime Delporte
f8f78c3eec Adding concurrency control in our updateMovieHandler and documenting it.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 57s
2025-11-08 10:41:44 +01:00
Maxime Delporte
1270a3bda6 Updating MovieModel's Delete method from internal/data/movies.go file. Create the deleteMovieHandler function inside cmd/api/movies.go. Adding the route into routes.go to delete a movie. 2025-11-07 11:37:19 +01:00
Maxime Delporte
69651c58b7 Updating MovieModel's method from internal/data/movies.go file. Create the updateMovieHandler function inside cmd/api/movies.go. Adding the route into routes.go to update a movie. 2025-11-07 11:27:45 +01:00
Maxime Delporte
0824a127b9 Updating internal/data/movies.go to Get a movie from the database. Updating cmd/api/movies.go showMovieHandler method to fetch a movie from a request (using the MovieModel's Get method). 2025-11-07 10:58:58 +01:00
Maxime Delporte
19a844ea2e Updating Insert MovieModel's method inserting a new record in the movies table. Updating createMovieHandler to use Insert MovieModel's method.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 1m0s
2025-11-06 17:10:33 +01:00
Maxime Delporte
1a658d3063 Updating movies.go with MovieModel: this struct is the gateway between our app and the database. Adding CRUD methods alongside for the Movie object. Creating models.go: this file holds a Models struct wrapping all of our Models. This way, we are able to use in our application struct in our main.go. 2025-11-06 10:41:12 +01:00
Maxime Delporte
6ef731573b Exporting the validation from cmd/api/movies.go to internal/data/movies.go by creating the ValidateMovie method. Updating createMovieHandler to use our new ValidateMovie method.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 55s
2025-10-28 12:07:04 +01:00
Maxime Delporte
040ace30ad Updating createMovieHandler accepting data.Runtime for the Runtime field. Updating internal/data/runtime.go with the json.Unmarshaler interface to transform our client's runtime string field '%d mins' into a Runtime type format.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 58s
2025-10-27 20:03:52 +01:00
Maxime Delporte
0f7515e198 Removing string json's parameter from Runtime variable inside Movie's struct. Creating errors.go handling different json's error for our API.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 54s
2025-10-21 18:55:45 +02:00
Maxime Delporte
bc21c4cf87 Use Runtime type instead of int32 in our Movie struct.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 54s
2025-10-21 16:29:11 +02:00
Maxime Delporte
cc588a1dc0 Adding 'Advanced JSON Customization' section in the README.md. Creating a runtime type (internal/data/runtime.go) to show how we can customize a JSON field.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 56s
2025-10-21 16:26:06 +02:00
Maxime Delporte
5ca50c6566 Fixing typo. 2025-10-19 18:08:58 +02:00
Maxime Delporte
9a0cb4db10 Creating Movie struct inside internal/data/movies.go to be used in cmd/api/movies.go. Updating the showMovieHandler with the Movie struct. 2025-10-19 11:03:04 +02:00