slideshow
This commit is contained in:
1 parent
988a5410f7
commit
262b853c5b
18 files changed
+1305
-30
No files matched your search
@@ -3,7 +3,8 @@ import { describe, it, expect, csrf } from './runner.js';
|
||||
describe('Relay: Push API', () => {
|
||||
it('push without config returns error', async () => {
|
||||
const settings = await fetch('api/relay/settings').then(r => r.json());
|
||||
if (settings.url && settings.has_key) return; // skip if configured
|
||||
// The GET endpoint echoes the secret directly as `key` (single-user local app).
|
||||
if (settings.url && settings.key) return; // skip if configured
|
||||
|
||||
const res = await fetch('api/relay/push', {
|
||||
method: 'POST', headers: { 'Content-Type': 'application/json', 'X-CSRF-Token': csrf() },
|
||||
@@ -25,7 +26,7 @@ describe('Relay: Push API', () => {
|
||||
describe('Relay: Poll API', () => {
|
||||
it('poll without config returns 0 pulled', async () => {
|
||||
const settings = await fetch('api/relay/settings').then(r => r.json());
|
||||
if (settings.url && settings.has_key) return;
|
||||
if (settings.url && settings.key) return;
|
||||
|
||||
const res = await fetch('api/relay/poll', {
|
||||
method: 'POST', headers: { 'X-CSRF-Token': csrf() },
|
||||
|
||||
Reference in new issue
Block a user