v1.3 - client and admin scaffolding
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { hasStoredClientSession } from '$lib/session';
|
||||
import { api } from '$lib/api';
|
||||
|
||||
export async function load() {
|
||||
if (!hasStoredClientSession()) {
|
||||
return {
|
||||
rawMaterials: []
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
return {
|
||||
rawMaterials: await api.rawMaterials()
|
||||
};
|
||||
} catch {
|
||||
return {
|
||||
rawMaterials: []
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user