[del] calendar_list function

This commit is contained in:
Fenris Wolf 2024-10-01 21:34:23 +02:00
parent 5744922308
commit 57eb5a862d
2 changed files with 0 additions and 80 deletions

View file

@ -195,57 +195,6 @@ namespace _zeitbild.repository.calendar
}
/**
* @todo optimize
*/
export async function list(
search_term : (null | string)
) : Promise<
Array<
{
id : _zeitbild.type_calendar_id;
preview : {
name : string;
};
}
>
>
{
return (
(
await get_core_store().search(
{
"expression": "(public = TRUE)",
"arguments": {
}
}
)
)
.filter(
({"key": key, "preview": preview}) => (
(
(search_term === null)
||
(search_term.length <= 1)
)
? true
: (
preview["name"].toLowerCase().includes(search_term.toLowerCase())
)
)
)
.map(
({"key": key, "preview": preview}) => ({
"id": key,
"preview": {
"name": preview["name"],
}
})
)
);
}
/**
*/
export function read(

View file

@ -56,35 +56,6 @@ namespace _zeitbild.service.calendar
}
/**
*/
export async function list(
search_term : (null | string)
) : Promise<
Array<
{
id : _zeitbild.type_calendar_id;
preview : {
name : string;
}
}
>
>
{
return (
_zeitbild.repository.calendar.list(search_term)
.then(
x => x.map(
(y : any) => ({
"id": y.key,
"preview": y.preview,
})
)
)
);
}
/**
*/
export function overview(