mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Getting organization by slug, adding this in url. And working on permissions.
This commit is contained in:
@@ -5,10 +5,10 @@ import {cookies} from 'next/headers';
|
||||
|
||||
const COOKIE_NAME = 'PORTABASE_ORGANIZATION_SLUG';
|
||||
|
||||
export async function getCurrentOrganizationId() {
|
||||
export async function getCurrentOrganizationSlug() {
|
||||
return (await cookies()).get(COOKIE_NAME)?.value || "";
|
||||
}
|
||||
|
||||
export async function setCurrentOrganizationId(slug: string) {
|
||||
export async function setCurrentOrganizationSlug(slug: string) {
|
||||
return (await cookies()).set(COOKIE_NAME, slug).get(COOKIE_NAME)?.value;
|
||||
}
|
||||
Reference in New Issue
Block a user