mirror of
https://github.com/pyrohost/pyrodactyl.git
synced 2026-04-06 04:01:58 +02:00
11 lines
486 B
TypeScript
11 lines
486 B
TypeScript
import http from '@/api/http';
|
|
import { Allocation } from '@/api/server/getServer';
|
|
import { rawDataToServerAllocation } from '@/api/transformers';
|
|
import { getGlobalDaemonType } from '@/api/server/getServer';
|
|
|
|
export default async (uuid: string, id: number, notes: string | null): Promise<Allocation> => {
|
|
const { data } = await http.post(`/api/client/servers/${getGlobalDaemonType()}/${uuid}/network/allocations/${id}`, { notes });
|
|
|
|
return rawDataToServerAllocation(data);
|
|
};
|