Simplify envs
This commit is contained in:
parent
6ffad8e65a
commit
a63a501991
4
.env
4
.env
|
@ -7,7 +7,3 @@ VITE_SENTRY_DSN=
|
|||
VITE_CDN_URL=
|
||||
|
||||
VITE_APPWRITE_ENDPOINT=
|
||||
VITE_APPWRITE_PROJECT_ID=
|
||||
VITE_APPWRITE_DATABASE_ID=
|
||||
VITE_APPWRITE_COLLECTION_ID_PUBLIC_TUNES=
|
||||
VITE_APPWRITE_COLLECTION_ID_USERS_BUCKETS=
|
||||
|
|
|
@ -10,10 +10,10 @@ const client = new Client();
|
|||
|
||||
client
|
||||
.setEndpoint(fetchEnv('VITE_APPWRITE_ENDPOINT'))
|
||||
.setProject(fetchEnv('VITE_APPWRITE_PROJECT_ID'));
|
||||
.setProject('hyper-tuner-cloud');
|
||||
|
||||
const account = new Account(client);
|
||||
const database = new Databases(client, fetchEnv('VITE_APPWRITE_DATABASE_ID'));
|
||||
const database = new Databases(client, 'public');
|
||||
const storage = new Storage(client);
|
||||
|
||||
export {
|
||||
|
|
|
@ -11,10 +11,9 @@ import {
|
|||
TuneDbDocument,
|
||||
} from '../types/dbData';
|
||||
import { databaseGenericError } from '../pages/auth/notifications';
|
||||
import { fetchEnv } from '../utils/env';
|
||||
|
||||
const COLLECTION_ID_PUBLIC_TUNES = fetchEnv('VITE_APPWRITE_COLLECTION_ID_PUBLIC_TUNES');
|
||||
const COLLECTION_ID_USERS_BUCKETS = fetchEnv('VITE_APPWRITE_COLLECTION_ID_USERS_BUCKETS');
|
||||
const COLLECTION_ID_PUBLIC_TUNES = 'tunes';
|
||||
const COLLECTION_ID_USERS_BUCKETS = 'usersBuckets';
|
||||
|
||||
const useDb = () => {
|
||||
const updateTune = async (documentId: string, data: TuneDbDataPartial) => {
|
||||
|
|
Loading…
Reference in New Issue