mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-27 19:19:25 +01:00
15 lines
485 B
TypeScript
15 lines
485 B
TypeScript
import Service from "#models/service"
|
|
|
|
export class SystemService {
|
|
async getServices({
|
|
installedOnly = true,
|
|
}:{
|
|
installedOnly?: boolean
|
|
}): Promise<{ id: number; service_name: string; installed: boolean }[]> {
|
|
const query = Service.query().orderBy('service_name', 'asc').select('id', 'service_name', 'installed', 'ui_location').where('is_dependency_service', false)
|
|
if (installedOnly) {
|
|
query.where('installed', true);
|
|
}
|
|
return await query;
|
|
}
|
|
} |