Extract API endpoints for quick replies

This commit is contained in:
Cohee
2024-03-20 00:46:46 +02:00
parent d448d4f65b
commit 7dcd39c806
3 changed files with 45 additions and 28 deletions

View File

@ -177,7 +177,7 @@ export class QuickReplySet {
async performSave() {
const response = await fetch('/savequickreply', {
const response = await fetch('/api/quick-replies/save', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify(this),
@ -191,7 +191,7 @@ export class QuickReplySet {
}
async delete() {
const response = await fetch('/deletequickreply', {
const response = await fetch('/api/quick-replies/delete', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify(this),