implement graphQL and init postgres

This commit is contained in:
Fran Jurmanović
2025-07-06 19:19:36 +02:00
parent 016728532c
commit 26a0d33592
25 changed files with 1713 additions and 314 deletions

View File

@@ -107,7 +107,7 @@ func DefaultPagination() PaginationRequest {
return PaginationRequest{
Page: 1,
Limit: 10,
Sort: "dateCreated",
Sort: "created_at",
Order: "desc",
}
}
@@ -121,7 +121,7 @@ func (p *PaginationRequest) Validate() {
p.Limit = 10
}
if p.Sort == "" {
p.Sort = "dateCreated"
p.Sort = "created_at"
}
if p.Order != "asc" && p.Order != "desc" {
p.Order = "desc"