fix: cache with duplicated data
This commit is contained in:
@ -68,10 +68,7 @@ export const getServerSideProps = authenticationFromServerSide({
|
||||
const guildId = Number(context?.params?.guildId)
|
||||
if (isNaN(channelId) || isNaN(guildId)) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: '/404',
|
||||
permanent: false
|
||||
}
|
||||
notFound: true
|
||||
}
|
||||
}
|
||||
const { data: guildMember } = await api.get(`/guilds/${guildId}`)
|
||||
|
@ -63,10 +63,7 @@ export const getServerSideProps = authenticationFromServerSide({
|
||||
const guildId = Number(context?.params?.guildId)
|
||||
if (isNaN(channelId) || isNaN(guildId)) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: '/404',
|
||||
permanent: false
|
||||
}
|
||||
notFound: true
|
||||
}
|
||||
}
|
||||
const { data: guildMember } = await api.get<GuildMember>(
|
||||
@ -74,10 +71,7 @@ export const getServerSideProps = authenticationFromServerSide({
|
||||
)
|
||||
if (!guildMember.member.isOwner) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: '/404',
|
||||
permanent: false
|
||||
}
|
||||
notFound: true
|
||||
}
|
||||
}
|
||||
const { data: selectedChannelData } = await api.get(
|
||||
|
@ -49,10 +49,7 @@ export const getServerSideProps = authenticationFromServerSide({
|
||||
const guildId = Number(context?.params?.guildId)
|
||||
if (isNaN(guildId)) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: '/404',
|
||||
permanent: false
|
||||
}
|
||||
notFound: true
|
||||
}
|
||||
}
|
||||
const { data: guildMember } = await api.get(`/guilds/${guildId}`)
|
||||
|
@ -43,10 +43,7 @@ export const getServerSideProps = authenticationFromServerSide({
|
||||
const guildId = Number(context?.params?.guildId)
|
||||
if (isNaN(guildId)) {
|
||||
return {
|
||||
redirect: {
|
||||
destination: '/404',
|
||||
permanent: false
|
||||
}
|
||||
notFound: true
|
||||
}
|
||||
}
|
||||
const { data: guildMember } = await api.get<GuildMember>(
|
||||
|
Reference in New Issue
Block a user