The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: try to fix prettier errors
Roger!6b2a58e9c235
diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-nuxt-3.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-nuxt-3.mdxindex 8d6af74bc17..364bf1a1630 100644--- a/apps/docs/pages/guides/getting-started/tutorials/with-nuxt-3.mdx+++ b/apps/docs/pages/guides/getting-started/tutorials/with-nuxt-3.mdx@@ -127,14 +127,14 @@ const website = ref('')const avatar_path = ref('')loading.value = true-const user = useSupabaseUser();+const user = useSupabaseUser()let { data } = await supabase.from('profiles').select(`username, website, avatar_url`).eq('id', user.value.id).single()-+if (data) {username.value = data.usernamewebsite.value = data.website@@ -146,8 +146,8 @@ loading.value = falseasync function updateProfile() {try {loading.value = true- const user = useSupabaseUser();-+ const user = useSupabaseUser()+const updates = {id: user.value.id,username: username.value,@@ -155,15 +155,15 @@ async function updateProfile() {avatar_url: avatar_path.value,updated_at: new Date(),}-+let { error } = await supabase.from('profiles').upsert(updates, {- returning: 'minimal', // Don't return the value after inserting+ returning: 'minimal', // Don't return the value after inserting})if (error) throw error} catch (error) {- alert(error.message)+ alert(error.message)} finally {- loading.value = false+ loading.value = false}}@@ -274,23 +274,22 @@ const uploadAvatar = async (evt) => {files.value = evt.target.filestry {uploading.value = true-+if (!files.value || files.value.length === 0) {throw new Error('You must select an image to upload.')}-+const file = files.value[0]const fileExt = file.name.split('.').pop()const fileName = `${Math.random()}.${fileExt}`const filePath = `${fileName}`-+let { error: uploadError } = await supabase.storage.from('avatars').upload(filePath, file)-+if (uploadError) throw uploadError-+emit('update:path', filePath)emit('upload')-} catch (error) {alert(error.message)} finally {@@ -320,7 +319,7 @@ watch(path, () => {<div style="width: 10em; position: relative;"><label class="button primary block" for="single">- {{ uploading ? "Uploading ..." : "Upload" }}+ {{ uploading ? 'Uploading ...' : 'Upload' }}</label><inputstyle="position: absolute; visibility: hidden;"@@ -349,7 +348,7 @@ const website = ref('')const avatar_path = ref('')loading.value = true-const user = useSupabaseUser();+const user = useSupabaseUser()let { data } = await supabase.from('profiles')@@ -368,8 +367,8 @@ loading.value = falseasync function updateProfile() {try {loading.value = true- const user = useSupabaseUser();-+ const user = useSupabaseUser()+const updates = {id: user.value.id,username: username.value,@@ -377,11 +376,11 @@ async function updateProfile() {avatar_url: avatar_path.value,updated_at: new Date(),}-+let { error } = await supabase.from('profiles').upsert(updates, {returning: 'minimal', // Don't return the value after inserting})-+if (error) throw error} catch (error) {alert(error.message)diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-vue-3.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-vue-3.mdxindex 6d1ba416ed1..639176f8cdd 100644--- a/apps/docs/pages/guides/getting-started/tutorials/with-vue-3.mdx+++ b/apps/docs/pages/guides/getting-started/tutorials/with-vue-3.mdx@@ -68,7 +68,7 @@ Optionally, update [src/style.css](https://raw.githubusercontent.com/supabase/suLet's set up a Vue component to manage logins and sign ups. We'll use Magic Links, so users can sign in with their email without using passwords.-```html title=/src/components/Auth.vue+```vue title=/src/components/Auth.vue<script setup>import { ref } from 'vue'import { supabase } from '../supabase'@@ -120,7 +120,7 @@ const handleLogin = async () => {After a user is signed in we can allow them to edit their profile details and manage their account.Let's create a new component for that called `Account.vue`.-```html title=src/components/Account.vue+```vue title=src/components/Account.vue<script setup>import { supabase } from '../supabase'import { onMounted, ref, toRefs } from 'vue'@@ -233,7 +233,7 @@ async function signOut() {Now that we have all the components in place, let's update `App.vue`:-```html title=src/App.vue+```vue title=src/App.vue<script setup>import { onMounted, ref } from 'vue'import Account from './components/Account.vue'@@ -279,7 +279,7 @@ Every Supabase project is configured with [Storage](/docs/guides/storage) for maLet's create an avatar for the user so that they can upload a profile photo. We can start by creating a new component:-```html title=src/components/Avatar.vue+```vue title=src/components/Avatar.vue<script setup>import { ref, toRefs, watch } from 'vue'import { supabase } from '../supabase'@@ -344,7 +344,7 @@ watch(path, () => {<div :style="{ width: size + 'em' }"><label class="button primary block" for="single">- {{ uploading ? "Uploading ..." : "Upload" }}+ {{ uploading ? 'Uploading ...' : 'Upload' }}</label><inputstyle="visibility: hidden; position: absolute"@@ -363,7 +363,7 @@ watch(path, () => {And then we can add the widget to the Account page:-```html title=src/components/Account.vue+```vue title=src/components/Account.vue<script>// Import the new componentimport Avatar from './Avatar.vue'