root: return API dates as timestamp

This commit is contained in:
Jens Langhammer 2020-12-28 13:07:49 +01:00
parent 119adb3e7b
commit 5f9c1e229c
2 changed files with 5 additions and 0 deletions

View file

@ -142,6 +142,7 @@ SWAGGER_SETTINGS = {
REST_FRAMEWORK = { REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "authentik.api.pagination.Pagination", "DEFAULT_PAGINATION_CLASS": "authentik.api.pagination.Pagination",
"PAGE_SIZE": 100, "PAGE_SIZE": 100,
'DATETIME_FORMAT': '%s',
"DEFAULT_FILTER_BACKENDS": [ "DEFAULT_FILTER_BACKENDS": [
"rest_framework_guardian.filters.ObjectPermissionsFilter", "rest_framework_guardian.filters.ObjectPermissionsFilter",
"django_filters.rest_framework.DjangoFilterBackend", "django_filters.rest_framework.DjangoFilterBackend",

View file

@ -50,3 +50,7 @@ export function loading<T>(v: T, actual: TemplateResult): TemplateResult {
} }
return actual; return actual;
} }
export function time(t: string): Date {
return new Date(parseInt(t, 10) * 1000);
}