diff options
author | Daniel Friesel <derf@finalrewind.org> | 2023-01-21 08:36:25 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2023-01-21 08:36:25 +0100 |
commit | 3e2491a9bc6579ccf017f0dbc2573b5ab4c75613 (patch) | |
tree | fe2e0af05dacc9b51aad3ceee7121471012d8cc4 /templates/api_documentation.html.ep | |
parent | 72c50a7cc8fea6942a000d3f8f40bb31ee968ba3 (diff) |
API documentation: do not perform database requests from template helpers
Diffstat (limited to 'templates/api_documentation.html.ep')
-rw-r--r-- | templates/api_documentation.html.ep | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/templates/api_documentation.html.ep b/templates/api_documentation.html.ep index 55cd54a..c9125a2 100644 --- a/templates/api_documentation.html.ep +++ b/templates/api_documentation.html.ep @@ -1,10 +1,6 @@ % my $api_root = $self->url_for('/api/v1')->to_abs->scheme('https'); -% my $token = {}; -% my $uid; -% if (is_user_authenticated()) { - % $uid = current_user()->{id}; - % $token = get_api_token(); -% } +% my $token = stash('api_token') // {}; +% my $uid = stash('uid') // q{}; <h1>API</h1> |