diff options
| author | simponic <simponic@hatecomputers.club> | 2024-03-28 12:57:35 -0400 |
|---|---|---|
| committer | simponic <simponic@hatecomputers.club> | 2024-03-28 12:57:35 -0400 |
| commit | b2fc689bdcff28bf75c0128db19ba4730d726b4f (patch) | |
| tree | 37c16d95183242516ba667aa5f441539d152c279 /templates/api_keys.html | |
| parent | 75ba836d6072235fc7a71659f8630ab3c1b210ad (diff) | |
| download | hatecomputers.club-b2fc689bdcff28bf75c0128db19ba4730d726b4f.tar.gz hatecomputers.club-b2fc689bdcff28bf75c0128db19ba4730d726b4f.zip | |
dns api (#1)
Co-authored-by: Elizabeth Hunt <elizabeth.hunt@simponic.xyz>
Reviewed-on: https://git.hatecomputers.club/hatecomputers/hatecomputers.club/pulls/1
Diffstat (limited to 'templates/api_keys.html')
| -rw-r--r-- | templates/api_keys.html | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/templates/api_keys.html b/templates/api_keys.html new file mode 100644 index 0000000..93eebd5 --- /dev/null +++ b/templates/api_keys.html @@ -0,0 +1,40 @@ +{{ define "content" }} + <table> + <tr> + <th>Key</th> + <th>Created At</th> + <th>Revoke</th> + </tr> + {{ if (eq (len .APIKeys) 0) }} + <tr> + <td colspan="5"><span class="blinky">No API Keys Found</span></td> + </tr> + {{ end }} + {{ range $key := .APIKeys }} + <tr> + <td>{{ $key.Key }}</td> + <td>{{ $key.CreatedAt }}</td> + <td> + <form method="POST" action="/keys/delete"> + <input type="hidden" name="key" value="{{ $key.Key }}" /> + <input type="submit" value="Revoke" /> + </form> + </td> + </tr> + {{ end }} + </table> + <br> + <form method="POST" action="/keys" class="form"> + <h2>Add An API Key</h2> + <hr> + <input type="submit" value="Generate" /> + </form> + + {{ if .FormError }} + {{ if (len .FormError.Errors) }} + {{ range $error := .FormError.Errors }} + <div class="error">{{ $error }}</div> + {{ end }} + {{ end }} + {{ end }} +{{ end }} |
