feat(cover): Display generated cover letters
This commit is contained in:
@@ -29,7 +29,7 @@ func Get(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
covers, err := cover.Get("user_id = $1", user.Id)
|
||||
covers, err := cover.Get("user_id = $1 ORDER BY created_at DESC", user.Id)
|
||||
if err != nil {
|
||||
res.Error(c, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
@@ -69,7 +69,7 @@ func Get(c *gin.Context) {
|
||||
}
|
||||
|
||||
// Get all user templates
|
||||
templates, err := template.Get("user_id = $1", user.Id)
|
||||
templates, err := template.Get("user_id = $1 ORDER BY created_at DESC", user.Id)
|
||||
if err != nil {
|
||||
res.Error(c, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user