The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: add after update fails
Alaister Young4e21c325009b
diff --git a/studio/localStores/sqlEditor/SqlEditorStore.js b/studio/localStores/sqlEditor/SqlEditorStore.jsindex 799d842c0b0..7b05598377d 100644--- a/studio/localStores/sqlEditor/SqlEditorStore.js+++ b/studio/localStores/sqlEditor/SqlEditorStore.js@@ -358,10 +358,10 @@ class SqlEditorStore {}renameQuery(id, model) {- const found = this.tabs.find((x) => x.id == id)+ const found = this.tabs.find((x) => x.id === id)found?.rename(model)- const favorite = this.favorites.find((x) => x.key == id)+ const favorite = this.favorites.find((x) => x.key === id)favorite?.rename(model)}diff --git a/studio/stores/content/ProjectContentStore.ts b/studio/stores/content/ProjectContentStore.tsindex ed04ec3cccc..55217117eec 100644--- a/studio/stores/content/ProjectContentStore.ts+++ b/studio/stores/content/ProjectContentStore.ts@@ -260,16 +260,19 @@ export default class ProjectContentStore implements IProjectContentStore {return { data: created, error: null }}- async update(id: any, updates: any, type: UserContent['type']) {+ async update(id: any, updates: any, type?: UserContent['type']) {try {const headers = {'Content-Type': 'application/json',}let payload = {...updates,- type,id,}+ if (type) {+ payload.type = type+ }+const url = `${this.baseUrl}?id=${id}`const updated = await patch<UserContent[]>(url, payload, { headers })if (updated.error) throw updated.error