Skip to content

Commit

Permalink
fix(organizations): add missing revalidatepath on org settings
Browse files Browse the repository at this point in the history
  • Loading branch information
SelmaBergstrand committed Oct 21, 2024
1 parent b68a600 commit ac89822
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
userCanEditOrganization,
} from 'app/(admin)/utils/firebase'
import { firestore } from 'firebase-admin'
import { revalidatePath } from 'next/cache'
import { redirect } from 'next/navigation'
import { TColumn } from 'types/column'
import { TOrganizationID } from 'types/settings'
Expand All @@ -17,4 +18,5 @@ export async function saveColumns(oid: TOrganizationID, columns: TColumn[]) {
await firestore().collection('organizations').doc(oid).update({
'defaults.columns': columns,
})
revalidatePath(`/organizations/${oid}`)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
userCanEditOrganization,
} from 'app/(admin)/utils/firebase'
import { firestore } from 'firebase-admin'
import { revalidatePath } from 'next/cache'
import { redirect } from 'next/navigation'
import { TFontSize } from 'types/meta'
import { TOrganizationID } from 'types/settings'
Expand All @@ -17,4 +18,5 @@ export async function setFontSize(oid: TOrganizationID, fontSize: TFontSize) {
await firestore().collection('organizations').doc(oid).update({
'defaults.font': fontSize,
})
revalidatePath(`/organizations/${oid}`)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
userCanEditOrganization,
} from 'app/(admin)/utils/firebase'
import { firestore } from 'firebase-admin'
import { revalidatePath } from 'next/cache'
import { redirect } from 'next/navigation'
import { TCountyID, TOrganizationID } from 'types/settings'

Expand All @@ -19,4 +20,5 @@ export async function setCounties(
await firestore().collection('organizations').doc(oid).update({
'defaults.counties': countiesList,
})
revalidatePath(`/organizations/${oid}`)
}

0 comments on commit ac89822

Please sign in to comment.