File size: 518 Bytes
5b324f1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import {_axios} from "@/utils/axios";

export const createMapItem = (
    _id: string,
    x: number,
    y: number,
    rotation: 0 | 1 | 2 | 3,
    typeId: string,
    mapId: string
) => {
    return _axios.post("/map-item/create", {_id, x, y, rotation, typeId, mapId});
};

export function deleteMapItem(id: string){
    return _axios.delete("/map-item/delete", {params: {id}});
};

export function linkMapItem(sourceId: string, targetId: string){
    return _axios.post("/map-item/link", {sourceId, targetId});
};