File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed
share-api/src/Share/Postgres Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ searchProjects caller userIdFilter (Query query) psk limit = do
159159 FROM projects_by_user_permission(#{caller}, #{ProjectView}) p
160160 JOIN users owner ON p.owner_user_id = owner.id
161161 WHERE p.owner_user_id = #{userId}
162- ORDER BY p.created_at, p.slug DESC
162+ ORDER BY p.created_at DESC , p.slug ASC
163163 LIMIT #{limit}
164164 |]
165165 _ -> do
@@ -276,7 +276,7 @@ listProjectsByUserWithMetadata callerUserId projectOwnerUserId = do
276276 FROM projects_by_user_permission(#{callerUserId}, #{ProjectView}) AS p
277277 JOIN users owner ON owner.id = p.owner_user_id
278278 WHERE p.owner_user_id = #{projectOwnerUserId}
279- ORDER BY p.created_at, p.slug DESC
279+ ORDER BY p.created_at DESC , p.slug ASC
280280 |]
281281 where
282282 unpackRows :: [Project PG. :. FavData PG. :. ProjectOwner ] -> [(Project , FavData , ProjectOwner )]
Original file line number Diff line number Diff line change 33 {
44 "createdAt" : " <TIMESTAMP>" ,
55 "isFaved" : false ,
6- "numFavs" : 1 ,
6+ "numFavs" : 0 ,
77 "owner" : {
88 "handle" : " @test" ,
99 "name" : null ,
1010 "type" : " user"
1111 },
12- "slug" : " publictestproject " ,
13- "summary" : " test project summary" ,
12+ "slug" : " privatetestproject " ,
13+ "summary" : " private summary" ,
1414 "tags" : [],
1515 "updatedAt" : " <TIMESTAMP>" ,
16- "visibility" : " public "
16+ "visibility" : " private "
1717 },
1818 {
1919 "createdAt" : " <TIMESTAMP>" ,
2020 "isFaved" : false ,
21- "numFavs" : 0 ,
21+ "numFavs" : 1 ,
2222 "owner" : {
2323 "handle" : " @test" ,
2424 "name" : null ,
2525 "type" : " user"
2626 },
27- "slug" : " privatetestproject " ,
28- "summary" : " private summary" ,
27+ "slug" : " publictestproject " ,
28+ "summary" : " test project summary" ,
2929 "tags" : [],
3030 "updatedAt" : " <TIMESTAMP>" ,
31- "visibility" : " private "
31+ "visibility" : " public "
3232 }
3333 ],
3434 "status" : [
Original file line number Diff line number Diff line change 99 "name" : " The Transcript User" ,
1010 "type" : " user"
1111 },
12- "slug" : " transcriptproject " ,
13- "summary" : null ,
12+ "slug" : " containers " ,
13+ "summary" : " This is my project " ,
1414 "tags" : [],
1515 "updatedAt" : " <TIMESTAMP>" ,
1616 "visibility" : " private"
2424 "name" : " The Transcript User" ,
2525 "type" : " user"
2626 },
27- "slug" : " containers " ,
28- "summary" : " This is my project " ,
27+ "slug" : " transcriptproject " ,
28+ "summary" : null ,
2929 "tags" : [],
3030 "updatedAt" : " <TIMESTAMP>" ,
3131 "visibility" : " private"
You can’t perform that action at this time.
0 commit comments