Compare commits
2 Commits
6e24b68a08
...
2140d06fb5
| Author | SHA1 | Date | |
|---|---|---|---|
| 2140d06fb5 | |||
| 16248416e7 |
@@ -10,15 +10,16 @@ import { resolve } from '$app/paths';
|
|||||||
import sanitizeHtml from 'sanitize-html';
|
import sanitizeHtml from 'sanitize-html';
|
||||||
|
|
||||||
export const load: PageServerLoad = async (event) => {
|
export const load: PageServerLoad = async (event) => {
|
||||||
const akti = await db.query.aktis.findFirst({
|
const [akti, r] = await Promise.all([
|
||||||
where: eq(aktis.id, event.params.aktiId),
|
db.query.aktis.findFirst({
|
||||||
with: { author: true }
|
where: eq(aktis.id, event.params.aktiId),
|
||||||
});
|
with: { author: true }
|
||||||
|
}),
|
||||||
const r = await db.query.ratings.findMany({
|
db.query.ratings.findMany({
|
||||||
with: { user: true },
|
with: { user: true },
|
||||||
where: eq(ratings.aktiId, event.params.aktiId)
|
where: eq(ratings.aktiId, event.params.aktiId)
|
||||||
});
|
})
|
||||||
|
]);
|
||||||
|
|
||||||
if (!akti) {
|
if (!akti) {
|
||||||
error(404, { message: 'Die Akti gits garnid, sorry...' });
|
error(404, { message: 'Die Akti gits garnid, sorry...' });
|
||||||
|
|||||||
Reference in New Issue
Block a user