Refactors Articles and Voter
- Move files into components (article) - Split articles routes - Refactoring for remove ktor-voter (ArticleVoter) - Remove mutability - Move DataConversion to separate file (Converter.kt) - Add Schemas for Articles routes - Fix SQL Query for Workgroup roles - rename container_name in docker-compose
This commit is contained in:
@@ -21,11 +21,13 @@ begin
|
||||
into resource, total
|
||||
from (
|
||||
select
|
||||
a.*,
|
||||
a.id,
|
||||
a.title,
|
||||
a.deleted_at,
|
||||
a.draft,
|
||||
find_citizen_by_id_with_user(a.created_by_id) as created_by,
|
||||
find_workgroup_by_id(a.workgroup_id) as workgroup,
|
||||
count_vote(a.id) as votes,
|
||||
count_opinion(a.id) as opinions,
|
||||
zdb.score(a.ctid) _score
|
||||
from article as a
|
||||
left join vote_cache ca using (id)
|
||||
|
||||
Reference in New Issue
Block a user