This was a copilot suggestion and it's super valid, putting it in it's own issue however. This will require
- updating the query
- running
make sqlc to regenerate the database go queries
- you'll then need to change the handler and service, and maybe even create a new type and mapper
If you create a new model, say GetPosition, it will be functionally identical to the existing DeletePosition model. Maybe something can be done to reduce code duplication here.
Also, this will change the handler from searching via a URL parameter to using the JSON body entirely for the get request.
Below is a screenshot from the Copilot suggestion:

This was a copilot suggestion and it's super valid, putting it in it's own issue however. This will require
make sqlcto regenerate the database go queriesIf you create a new model, say GetPosition, it will be functionally identical to the existing DeletePosition model. Maybe something can be done to reduce code duplication here.
Also, this will change the handler from searching via a URL parameter to using the JSON body entirely for the get request.
Below is a screenshot from the Copilot suggestion: