chore: limit list of projects to 200

This commit is contained in:
fiftin 2024-04-22 13:15:32 +05:00
parent 15ad753e8e
commit 5a0c9b8e8b
No known key found for this signature in database
GPG Key ID: 044381366A5D4731

View File

@ -44,6 +44,7 @@ func (d *SqlDb) GetProjects(userID int) (projects []db.Project, err error) {
Join("project__user as pu on pu.project_id=p.id").
Where("pu.user_id=?", userID).
OrderBy("p.name").
Limit(200).
ToSql()
if err != nil {
@ -59,7 +60,6 @@ func (d *SqlDb) GetProject(projectID int) (project db.Project, err error) {
query, args, err := squirrel.Select("p.*").
From("project as p").
Where("p.id=?", projectID).
Limit(200).
ToSql()
if err != nil {