-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #676 The changes here add the necessary schema, service methods, and endpoint for the creation of templates. - Db connection updated so expire on commit is false. This prevents errors when trying to refresh the object for return to the api from service - User model imported in timelog model explicitly. This solves occasional 'NoneType' error being thrown. - Add template schema. Includes validation for column size, as well as check for is_global and user_id. - Add template endpoint. Also add a 404 as a potential response type for the router. - Add service to create template Notes: For the schemas, I used the full-stack-fastapi-postgresql as a loose guide. Shared properties are all on the base model as optional. Then models that need other properties or for properties to be mandatory inherit and override the base.
- Loading branch information
Showing
5 changed files
with
81 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters