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() {
|
export async function apiPrices() {
|
||||||
try {
|
try {
|
||||||
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL_STRING;
|
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL;
|
||||||
if (!pocketbaseUrl) {
|
if (!pocketbaseUrl) {
|
||||||
throw Error('Connection Timeout');
|
throw Error('Connection Timeout');
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ export async function signup(formData: SignUpForm) {
|
||||||
const password = formData.password;
|
const password = formData.password;
|
||||||
const organisation = formData.organisation;
|
const organisation = formData.organisation;
|
||||||
console.log('app/(authenticated)/actions', 'organisation', 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;
|
const adminToken = process.env.NEXT_PUBLIC_POCKETBASE_ADMIN_TOKEN as string;
|
||||||
try {
|
try {
|
||||||
const orgRes = await fetch(
|
const orgRes = await fetch(
|
||||||
|
@ -175,7 +175,7 @@ export async function logout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createCheckoutSession(price_id: string, type: string) {
|
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) {
|
if (!pocketbaseUrl) {
|
||||||
throw Error('Connection Timeout');
|
throw Error('Connection Timeout');
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ export async function getSubscriptions() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createManagementSubscriptionSession() {
|
export async function createManagementSubscriptionSession() {
|
||||||
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL_STRING;
|
const pocketbaseUrl = process.env.NEXT_PUBLIC_POCKETBASE_URL;
|
||||||
if (!pocketbaseUrl) {
|
if (!pocketbaseUrl) {
|
||||||
throw Error('Connection Timeout');
|
throw Error('Connection Timeout');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import PocketBase from 'pocketbase';
|
import PocketBase from 'pocketbase';
|
||||||
|
|
||||||
const pb = (() => {
|
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);
|
return new PocketBase(POCKETBASE_URL);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue