Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fixed a silly mistake in order of definition for the `process.env` variables.

Jason Zi Feng Leie61aedf8c00f
diff --git a/studio/pages/api/organizations/index.ts b/studio/pages/api/organizations/index.ts
index c3b41b29bbd..48ac8439cfc 100644
--- a/studio/pages/api/organizations/index.ts
+++ b/studio/pages/api/organizations/index.ts
@@ -21,7 +21,7 @@ const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
const response = [
{
id: 1,
- name: 'Default Organization' || process.env.DEFAULT_ORGANIZATION_NAME,
+ name: process.env.DEFAULT_ORGANIZATION_NAME || 'Default Organization',
slug: 'default-org-slug',
billing_email: '[email protected]',
},
diff --git a/studio/pages/api/profile/index.ts b/studio/pages/api/profile/index.ts
index a985c48479b..6b25f3d3396 100644
--- a/studio/pages/api/profile/index.ts
+++ b/studio/pages/api/profile/index.ts
@@ -29,14 +29,14 @@ const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
organizations: [
{
id: 1,
- name: 'Default Organization' || process.env.DEFAULT_ORGANIZATION_NAME,
+ name: process.env.DEFAULT_ORGANIZATION_NAME || 'Default Organization',
slug: 'default-org-slug',
billing_email: '[email protected]',
projects: [
{
id: 1,
ref: 'default',
- name: 'Default Project' || process.env.DEFAULT_PROJECT_NAME,
+ name: process.env.DEFAULT_PROJECT_NAME || 'Default Project',
organization_id: 1,
cloud_provider: 'localhost',
status: 'ACTIVE_HEALTHY',
diff --git a/studio/pages/api/projects/[ref]/index.ts b/studio/pages/api/projects/[ref]/index.ts
index 6339dbe5543..d8747eafb49 100644
--- a/studio/pages/api/projects/[ref]/index.ts
+++ b/studio/pages/api/projects/[ref]/index.ts
@@ -21,7 +21,7 @@ const handleGet = async (req: NextApiRequest, res: NextApiResponse) => {
const response = {
id: 1,
ref: 'default',
- name: 'Default Project' || process.env.DEFAULT_PROJECT_NAME,
+ name: process.env.DEFAULT_PROJECT_NAME || 'Default Project',
organization_id: 1,
cloud_provider: 'localhost',
status: 'ACTIVE_HEALTHY',
diff --git a/studio/pages/api/projects/index.ts b/studio/pages/api/projects/index.ts
index f708142b571..a6a20f609b3 100644
--- a/studio/pages/api/projects/index.ts
+++ b/studio/pages/api/projects/index.ts
@@ -1,6 +1,7 @@
-import apiWrapper from 'lib/api/apiWrapper'
import { NextApiRequest, NextApiResponse } from 'next'
+import apiWrapper from 'lib/api/apiWrapper'
+
export default (req: NextApiRequest, res: NextApiResponse) => apiWrapper(req, res, handler)
async function handler(req: NextApiRequest, res: NextApiResponse) {
@@ -21,7 +22,7 @@ const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
{
id: 1,
ref: 'default',
- name: 'Default Project',
+ name: process.env.DEFAULT_PROJECT_NAME || 'Default Project',
organization_id: 1,
cloud_provider: 'localhost',
status: 'ACTIVE_HEALTHY',
diff --git a/studio/pages/api/props/project/[ref]/api.ts b/studio/pages/api/props/project/[ref]/api.ts
index 10705a675e0..b9a8b68743b 100644
--- a/studio/pages/api/props/project/[ref]/api.ts
+++ b/studio/pages/api/props/project/[ref]/api.ts
@@ -28,7 +28,7 @@ const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
db_user: 'postgres',
id: 1,
inserted_at: undefined,
- name: 'Default Project' || process.env.DEFAULT_PROJECT_NAME,
+ name: process.env.DEFAULT_PROJECT_NAME || 'Default Project',
ref: 'default',
status: 'ACTIVE_HEALTHY',
services: [
diff --git a/studio/pages/api/props/project/[ref]/index.ts b/studio/pages/api/props/project/[ref]/index.ts
index 1d14d1bf382..a197855ddaf 100644
--- a/studio/pages/api/props/project/[ref]/index.ts
+++ b/studio/pages/api/props/project/[ref]/index.ts
@@ -22,7 +22,7 @@ const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
project: {
id: 1,
ref: 'default',
- name: 'Default Project' || process.env.DEFAULT_PROJECT_NAME,
+ name: process.env.DEFAULT_PROJECT_NAME || 'Default Project',
status: 'ACTIVE_HEALTHY',
organization_id: 1,
inserted_at: '2021-08-02T06:40:40.646362',
diff --git a/studio/pages/api/props/project/[ref]/settings.ts b/studio/pages/api/props/project/[ref]/settings.ts
index a6132cf3d0a..5677414b23a 100644
--- a/studio/pages/api/props/project/[ref]/settings.ts
+++ b/studio/pages/api/props/project/[ref]/settings.ts
@@ -30,7 +30,7 @@ const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
id: 1,
inserted_at: undefined,
jwt_secret: '-',
- name: 'Default Project' || process.env.DEFAULT_PROJECT_NAME,
+ name: process.env.DEFAULT_PROJECT_NAME || 'Default Project',
ref: 'default',
region: 'ap-southeast-1',
status: 'ACTIVE_HEALTHY',