preparing to create new items
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -4,6 +4,14 @@ export function api(rel_path){
|
||||
return `${location.protocol}//${location.host.replace('5173','8080')}/api/${rel_path}`;
|
||||
}
|
||||
|
||||
export async function post(url,data){
|
||||
return fetch(url,{
|
||||
credentials : 'include',
|
||||
method : 'POST',
|
||||
body : JSON.stringify(data)
|
||||
});
|
||||
}
|
||||
|
||||
export function target(code){
|
||||
if (!code) return null;
|
||||
let altered = code;
|
||||
|
||||
Reference in New Issue
Block a user