Office Hour block, codebase clean up for schemas and utils
This commit is contained in:
21
src/routes/council/+page.server.ts
Normal file
21
src/routes/council/+page.server.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { getFromCMS } from '$lib/utils.js';
|
||||
|
||||
const query = `*[_type == "members"]{
|
||||
name,
|
||||
email,
|
||||
position,
|
||||
positionDescription,
|
||||
"image": image.asset->url,
|
||||
yearProgram
|
||||
}`;
|
||||
|
||||
const councilGoofyPicQuery = `*[_type == "homepage"]{
|
||||
"url": councilGoofyPic.asset->url+"?h=1000&fm=webp"
|
||||
}[0]`;
|
||||
|
||||
export const load = async () => {
|
||||
return {
|
||||
members: await getFromCMS(query),
|
||||
councilGoofyPic: await getFromCMS(councilGoofyPicQuery),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user