refactor: expose api for loading demo project

This commit is contained in:
Carlos Valente
2024-11-22 21:43:13 +01:00
committed by Carlos Valente
parent a518dc4882
commit 7bf90d669a
4 changed files with 31 additions and 3 deletions
+8
View File
@@ -112,6 +112,14 @@ export async function loadProject(filename: string): Promise<MessageResponse> {
return res.data;
}
/**
* HTTP request to load the demo project file
*/
export async function loadDemo(): Promise<MessageResponse> {
const res = await axios.post(`${dbPath}/demo`);
return res.data;
}
/**
* HTTP request to duplicate a project file
*/