mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-05-04 04:33:10 +00:00
Upgrade Clerk, Next.js, and React to latest versions + minor code changes
This commit is contained in:
parent
a63270db0c
commit
a89c9a9b02
31 changed files with 140 additions and 130 deletions
|
@ -12,7 +12,7 @@ interface Props {
|
|||
|
||||
export const createAuditLog = async (props: Props) => {
|
||||
try {
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
const user = await currentUser();
|
||||
|
||||
if (!orgId || !user) throw new Error('User not found');
|
||||
|
|
|
@ -4,7 +4,7 @@ import { db } from '@/lib/db';
|
|||
import { MAX_FREE_BOARDS } from '@/constants/boards';
|
||||
|
||||
export const incrementAvailableCount = async () => {
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
|
||||
if (!orgId) {
|
||||
throw new Error('Unauthorized');
|
||||
|
@ -27,7 +27,7 @@ export const incrementAvailableCount = async () => {
|
|||
};
|
||||
|
||||
export const decreaseAvailableCount = async () => {
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
|
||||
if (!orgId) {
|
||||
throw new Error('Unauthorized');
|
||||
|
@ -50,7 +50,7 @@ export const decreaseAvailableCount = async () => {
|
|||
};
|
||||
|
||||
export const hasAvailableCount = async () => {
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
|
||||
if (!orgId) {
|
||||
throw new Error('Unauthorized');
|
||||
|
@ -69,7 +69,7 @@ export const hasAvailableCount = async () => {
|
|||
};
|
||||
|
||||
export const getAvailableCount = async () => {
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
|
||||
if (!orgId) {
|
||||
return 0;
|
||||
|
|
|
@ -5,7 +5,7 @@ import { db } from '@/lib/db';
|
|||
const DAY_IN_MS = 86_400_000;
|
||||
|
||||
export const checkSubscription = async () => {
|
||||
const { orgId } = auth();
|
||||
const { orgId } = await auth();
|
||||
|
||||
if (!orgId) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue