What sparked this issue was this comment in the recent PR #189 it goes like this:
// TODO: Get event and return it here. Issue is that the generated sqlc func
// isn't returning the resource, so the service isn't either.
This should be a simple fix, from the sqlc docs we have an example:
-- name: CreateAuthor :one
INSERT INTO authors (
name, bio
) VALUES (
$1, $2
)
RETURNING *;
In our create queries we do not have the RETURNING clause at the end so it returns nothing.
Following this make sure sqlc updates the generated go code, and adjust the the api accordingly to make routes like /POST events return the new resource created.
What sparked this issue was this comment in the recent PR #189 it goes like this:
This should be a simple fix, from the sqlc docs we have an example:
In our create queries we do not have the RETURNING clause at the end so it returns nothing.
Following this make sure sqlc updates the generated go code, and adjust the the api accordingly to make routes like /POST events return the new resource created.