enabled paging while fetching locations
This commit is contained in:
@@ -2,7 +2,6 @@ import NextAuth, { NextAuthConfig } from 'next-auth';
|
||||
import GoogleProvider from 'next-auth/providers/google';
|
||||
import { Session } from 'next-auth';
|
||||
import { AuthenticatedUser } from './types/next-auth';
|
||||
import { BillingLocation } from './db-types';
|
||||
|
||||
const authConfig: NextAuthConfig = {
|
||||
callbacks: {
|
||||
@@ -60,7 +59,7 @@ export const isAuthErrorMessage = (obj: any): obj is AuthErrorMessage => {
|
||||
return (obj.message && obj.errors && obj.errors.message);
|
||||
}
|
||||
|
||||
export const withUser = (fn: (user: AuthenticatedUser, ...args:any) => Promise<Array<BillingLocation>>) => async (...args:any) => {
|
||||
export const withUser = <T>(fn: (user: AuthenticatedUser, ...args:any) => Promise<T>) => async (...args:any) => {
|
||||
const session = await auth();
|
||||
|
||||
if(!session) {
|
||||
|
||||
Reference in New Issue
Block a user