Add button to send test notification

This commit is contained in:
André Martins 2024-10-18 18:53:19 +02:00 committed by tesladodger
parent 6e2511bee7
commit 585ee35c59
2 changed files with 8 additions and 1 deletions

View file

@ -0,0 +1,5 @@
async function testNotifications() {
const url = '/api/test_notify'
await fetch(url, { method: 'post' })
}

View file

@ -44,6 +44,7 @@
</tr> </tr>
<tr> <tr>
<td><button type="submit" class="btn btn-primary">Save</button></td> <td><button type="submit" class="btn btn-primary">Save</button></td>
<td><button type="button" style="float: right;" class="btn btn-success" onclick="testNotifications()">Test notifications</button></td>
<td></td> <td></td>
</tr> </tr>
</form> </form>
@ -199,6 +200,7 @@
</div> </div>
</div> </div>
</div> </div>
<script src="/fs/public/js/notify.js"></script>
{{ template "footer.html" }} {{ template "footer.html" }}
{{ end }} {{ end }}