mirror of
https://git.disroot.org/wolfree/wolfree-dockerfile
synced 2025-01-07 20:41:21 +01:00
17 lines
425 B
TypeScript
17 lines
425 B
TypeScript
/* SPDX-License-Identifier: AGPL-3.0-or-later */
|
|
|
|
import AjaxResponse from "./AjaxResponse.js";
|
|
import type AjaxSettings from "./AjaxSettings.js";
|
|
|
|
export default async (AjaxSettings: AjaxSettings): Promise<AjaxResponse> => {
|
|
try {
|
|
Object.freeze(AjaxSettings);
|
|
|
|
// npm i @types/jquery
|
|
return Object.freeze(await jQuery.ajax(AjaxSettings));
|
|
} catch (error) {
|
|
console.warn({ error });
|
|
return {};
|
|
}
|
|
};
|