21 lines
426 B
TypeScript
21 lines
426 B
TypeScript
import routes from "@/routes";
|
|
import { getBaseHeaders } from "../utils";
|
|
|
|
export type Payload = null
|
|
|
|
export interface Response {
|
|
translations: Translation[];
|
|
meta: string;
|
|
}
|
|
|
|
export interface Translation {
|
|
key: string;
|
|
value: string;
|
|
}
|
|
|
|
export const createRequest = (): Request => {
|
|
const url = new URL(routes.server.getTranslations());
|
|
|
|
return new Request(url, { method: "GET", headers: getBaseHeaders() });
|
|
};
|