preparing to create new items

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-10-24 23:32:20 +02:00
parent 355af44b16
commit 4b4a575356
4 changed files with 44 additions and 3 deletions

View File

@@ -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;