forked from mrwyndham/fastpocket
bugfix - env cleanup
This commit is contained in:
parent
3411d0d7df
commit
044daa830f
|
@ -5,7 +5,7 @@ import pb from "@/lib/pocketbase";
|
|||
|
||||
export async function apiPrices() {
|
||||
try {
|
||||
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL_STRING;
|
||||
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL;
|
||||
if (!pocketbaseUrl) {
|
||||
throw Error('Connection Timeout');
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ export async function signup(formData: SignUpForm) {
|
|||
const password = formData.password;
|
||||
const organisation = formData.organisation;
|
||||
console.log('app/(authenticated)/actions', 'organisation', organisation)
|
||||
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL_STRING as string;
|
||||
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL as string;
|
||||
const adminToken = process.env.NEXT_PUBLIC_POCKETBASE_ADMIN_TOKEN as string;
|
||||
try {
|
||||
const orgRes = await fetch(
|
||||
|
@ -175,7 +175,7 @@ export async function logout() {
|
|||
}
|
||||
|
||||
export async function createCheckoutSession(price_id: string, type: string) {
|
||||
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL_STRING;
|
||||
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL;
|
||||
if (!pocketbaseUrl) {
|
||||
throw Error('Connection Timeout');
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ export async function getSubscriptions() {
|
|||
}
|
||||
|
||||
export async function createManagementSubscriptionSession() {
|
||||
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL_STRING;
|
||||
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL;
|
||||
if (!pocketbaseUrl) {
|
||||
throw Error('Connection Timeout');
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import PocketBase from 'pocketbase';
|
||||
|
||||
const pb = (() => {
|
||||
const POCKETBASE_URL = process.env.NEXT_PUBLIC_POCKETBASE_URL;
|
||||
const POCKETBASE_URL = process.env.NEXT_PUBLIC_POCKETBASE_URL + '/';
|
||||
return new PocketBase(POCKETBASE_URL);
|
||||
})();
|
||||
|
||||
|
|
Loading…
Reference in New Issue