You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The post service returns responses (y) whose values are copied from the request (x). Instead of copying, the response values should come from another database query. Add those queries.
The upsert queries in post are also using db.Prepare() when it is not necessary. See http://go-database-sql.org/prepared.html for more information. Use instead db.Exec() similar to what was used in upsertRole() method in the qryuser.go.
When finding posts, the items returned should be limited. Include limit and lapse in the select query for finding posts, similar to how user posts are found.
The post service returns responses (
y
) whose values are copied from the request (x
). Instead of copying, the response values should come from another database query. Add those queries.The upsert queries in post are also using
db.Prepare()
when it is not necessary. See http://go-database-sql.org/prepared.html for more information. Use insteaddb.Exec()
similar to what was used inupsertRole()
method in theqryuser.go
.When finding posts, the items returned should be limited. Include
limit
andlapse
in theselect
query for finding posts, similar to how user posts are found.A/C
upsertType()
db.Prepare()
.y.Name
tox.Name
, should query the database for the value ofy.Name
upsertPost()
y
with the fields fromx
, query the database for the needed informationdb.Prepare()
.qryuser.go
inupsertUser()
in PR Link roles to users in user service #86findPosts()
The text was updated successfully, but these errors were encountered: