Add GET /loan-orders/mobile to list loan orders created from the mobile app.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-22 18:37:31 +05:00
parent 8795ae2195
commit 427d5b4e07
6 changed files with 240 additions and 0 deletions

View File

@@ -176,6 +176,11 @@ func buildListQuery(filter loanorders.ListFilter) (whereClause string, args []in
conditions = append(conditions, fmt.Sprintf("lo.region = $%d", len(args)))
}
if filter.Source != "" {
args = append(args, filter.Source)
conditions = append(conditions, fmt.Sprintf("lo.source = $%d", len(args)))
}
if len(conditions) == 0 {
return "", args
}