mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 00:32:43 +10:00
feat: add next-runtime-env
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
import { APP_BASE_URL } from '@documenso/lib/constants/app';
|
||||
|
||||
import { FREE_PLAN_LIMITS } from './constants';
|
||||
import { TLimitsResponseSchema, ZLimitsResponseSchema } from './schema';
|
||||
import type { TLimitsResponseSchema } from './schema';
|
||||
import { ZLimitsResponseSchema } from './schema';
|
||||
|
||||
export type GetLimitsOptions = {
|
||||
headers?: Record<string, string>;
|
||||
@ -10,7 +11,7 @@ export type GetLimitsOptions = {
|
||||
export const getLimits = async ({ headers }: GetLimitsOptions = {}) => {
|
||||
const requestHeaders = headers ?? {};
|
||||
|
||||
const url = new URL(`${APP_BASE_URL}/api/limits`);
|
||||
const url = new URL('/api/limits', APP_BASE_URL ?? 'http://localhost:3000');
|
||||
|
||||
return fetch(url, {
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user