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
|
@ -10,7 +10,7 @@ import { CopyBoard } from './schema';
|
|||
import { redirect } from 'next/navigation';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) {
|
||||
return {
|
||||
|
|
|
@ -12,7 +12,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { CopyCard } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { CopyList } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import { incrementAvailableCount, hasAvailableCount } from '@/lib/org-limit';
|
|||
import { checkSubscription } from '@/lib/subscription';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) {
|
||||
return {
|
||||
|
|
|
@ -12,7 +12,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { CreateCard } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { CreateList } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { DeleteBoard } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { DeleteCard } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { DeleteList } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { StripeRedirect } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
const user = await currentUser();
|
||||
|
||||
if (!userId || !orgId || !user) return { error: 'Unauthorized' };
|
||||
|
|
|
@ -12,7 +12,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { UpdateBoard } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { UpdateCardOrder } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { UpdateCard } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { UpdateListOrder } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import { InputType, ReturnType } from './types';
|
|||
import { UpdateList } from './schema';
|
||||
|
||||
const handler = async (data: InputType): Promise<ReturnType> => {
|
||||
const { userId, orgId } = auth();
|
||||
const { userId, orgId } = await auth();
|
||||
|
||||
if (!userId || !orgId) return { error: 'Unauthorized' };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue