@devcycle/nextjs-sdk
Version:
The Next.js SDK for DevCycle!
13 lines • 447 B
JavaScript
'use server';
import { cookies } from 'next/headers';
import { revalidateTag } from 'next/cache';
import { debugUserCookieName } from '../cookie';
export const removeDebugUser = async (user) => {
const cookieStore = await cookies();
cookieStore.delete(debugUserCookieName);
// Revalidate caches to trigger fresh bucketing
if (user.user_id) {
revalidateTag(user.user_id);
}
};
//# sourceMappingURL=removeDebugUser.js.map