From 39faab6483b2631c9fca4acddea194295aaf1504 Mon Sep 17 00:00:00 2001 From: Jose Henrique Date: Mon, 9 Jun 2025 20:52:22 -0300 Subject: [PATCH] add popularidade ordering --- OpenCand.API/Repository/CandidatoRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenCand.API/Repository/CandidatoRepository.cs b/OpenCand.API/Repository/CandidatoRepository.cs index a7fe2f1..51af5cc 100644 --- a/OpenCand.API/Repository/CandidatoRepository.cs +++ b/OpenCand.API/Repository/CandidatoRepository.cs @@ -19,7 +19,7 @@ namespace OpenCand.Repository FROM candidato c WHERE c.apelido % @q OR c.nome % @q - ORDER BY sim DESC, length(c.nome) ASC + ORDER BY c.popularidade DESC, sim DESC, length(c.nome) ASC LIMIT 10; ", new { q = query })).AsList(); }