Skip to content

Commit ff0c4df

Browse files
WHOOOPWHOOOP
authored andcommitted
Fix wall
1 parent 72d25ad commit ff0c4df

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

pages/workspace/[id]/profile/[uid].tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import { InferGetServerSidePropsType } from "next";
1313
import { useRecoilState } from "recoil";
1414

1515
export const getServerSideProps = withSessionSsr(
16-
async ({ params, req }) => {
16+
async ({ query, req }) => {
1717
const notices = await prisma.inactivityNotice.findMany({
1818
where: {
1919
userId: req.session.userid,
20-
workspaceGroupId: parseInt(params?.id as string),
20+
workspaceGroupId: parseInt(query?.id as string),
2121
},
2222
orderBy: [
2323
{
@@ -28,7 +28,7 @@ export const getServerSideProps = withSessionSsr(
2828

2929
const sessions = await prisma.activitySession.findMany({
3030
where: {
31-
userId: parseInt(params?.uid as string),
31+
userId: parseInt(query?.uid as string),
3232
active: false
3333
},
3434
orderBy: {

pages/workspace/[id]/wall.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import toast, { Toaster } from "react-hot-toast";
1313
import { useRouter } from "next/router";
1414
import axios from "axios";
1515

16-
export const getServerSideProps = withPermissionCheckSsr(async ({ params, res }) => {
17-
if(!params?.id) {
16+
export const getServerSideProps = withPermissionCheckSsr(async ({ query, res }) => {
17+
if(!query?.id) {
1818
res.statusCode = 404;
1919
return {
2020
props: {}
@@ -23,7 +23,7 @@ export const getServerSideProps = withPermissionCheckSsr(async ({ params, res })
2323

2424
const posts = await prisma.wallPost.findMany({
2525
where: {
26-
workspaceGroupId: parseInt(params.id as string)
26+
workspaceGroupId: parseInt(query.id as string)
2727
},
2828
orderBy: {
2929
createdAt: "desc"

0 commit comments

Comments
 (0)