backend/source/services/group.ts
2025-10-23 11:34:00 +02:00

64 lines
1.3 KiB
TypeScript

/*
This file is part of »zeitbild«.
Copyright 2025 'kcf' <fenris@folksprak.org>
»zeitbild« is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
»zeitbild« is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with »zeitbild«. If not, see <http://www.gnu.org/licenses/>.
*/
namespace _zeitbild.service.group
{
/**
*/
export function list(
)
: Promise<
Array<
{
id : _zeitbild.type_group_id;
object : _zeitbild.type_group_object;
}
>
>
{
return _zeitbild.repository.group.list();
}
/**
*/
export function add(
group_object : _zeitbild.type_group_object
)
: Promise<_zeitbild.type_group_id>
{
return _zeitbild.repository.group.create(group_object);
}
/**
*/
export function change(
group_id : _zeitbild.type_group_id,
group_object : _zeitbild.type_group_object
)
: Promise<void>
{
return _zeitbild.repository.group.update(group_id, group_object);
}
}