File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
apps/labrinth/src/routes/internal/moderation Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ pub struct SearchProjectsFilter {
7373pub enum SearchProjectsSort {
7474 CreatedAsc ,
7575 CreatedDesc ,
76+ SeverityAsc ,
77+ SeverityDesc ,
7678}
7779
7880impl fmt:: Display for SearchProjectsSort {
@@ -267,7 +269,10 @@ async fn search_projects(
267269 -- sorting
268270 ORDER BY
269271 CASE WHEN $2 = 'created_asc' THEN created ELSE TO_TIMESTAMP(0) END ASC,
270- CASE WHEN $2 = 'created_desc' THEN created ELSE TO_TIMESTAMP(0) END DESC
272+ CASE WHEN $2 = 'created_desc' THEN created ELSE TO_TIMESTAMP(0) END DESC,
273+ CASE WHEN $2 = 'pending_status_first' THEN dri.status ELSE 'pending'::delphi_report_issue_status END ASC,
274+ CASE WHEN $2 = 'severity_asc' THEN dr.severity ELSE 'low'::delphi_severity END ASC,
275+ CASE WHEN $2 = 'severity_desc' THEN dr.severity ELSE 'low'::delphi_severity END DESC
271276
272277 -- pagination
273278 LIMIT $3
You can’t perform that action at this time.
0 commit comments