mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-06-21 11:05:36 +02:00
Add a DO NOT REPORT disclaimer to "Already Requested" message
This commit is contained in:
@ -35,7 +35,7 @@ let currentlyRequestedEndpoints: string[] = [];
|
|||||||
function makeRequest(method: string, uri: string, content?: object | string | number | null | boolean) : Promise<object | void> {
|
function makeRequest(method: string, uri: string, content?: object | string | number | null | boolean) : Promise<object | void> {
|
||||||
const id = method + uri;
|
const id = method + uri;
|
||||||
if(currentlyRequestedEndpoints.find(x => x == id) != undefined)
|
if(currentlyRequestedEndpoints.find(x => x == id) != undefined)
|
||||||
return Promise.reject(`Already requested: ${method} ${uri}`);
|
return Promise.reject(`DO NOT REPORT! Already requested: ${method} ${uri}`);
|
||||||
currentlyRequestedEndpoints.push(id);
|
currentlyRequestedEndpoints.push(id);
|
||||||
return fetch(uri,
|
return fetch(uri,
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user