fix: environments not being written correctly
This commit is contained in:
@@ -43,13 +43,15 @@ async function writeEnvironments(environment: Environment[]) {
|
|||||||
environment,
|
environment,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(ev)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await setDoc(
|
await setDoc(
|
||||||
doc(
|
doc(
|
||||||
getFirestore(),
|
getFirestore(),
|
||||||
"users",
|
"users",
|
||||||
currentUser$.value.uid,
|
currentUser$.value.uid,
|
||||||
"envrionments",
|
"environments",
|
||||||
"sync"
|
"sync"
|
||||||
),
|
),
|
||||||
ev
|
ev
|
||||||
@@ -85,6 +87,7 @@ async function writeGlobalEnvironment(variables: Environment["variables"]) {
|
|||||||
|
|
||||||
export function initEnvironments() {
|
export function initEnvironments() {
|
||||||
environments$.subscribe((envs) => {
|
environments$.subscribe((envs) => {
|
||||||
|
console.log("env update")
|
||||||
if (
|
if (
|
||||||
currentUser$.value &&
|
currentUser$.value &&
|
||||||
settingsStore.value.syncEnvironments &&
|
settingsStore.value.syncEnvironments &&
|
||||||
|
|||||||
Reference in New Issue
Block a user