The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Update response documentation for status code 201 & standardise responses
Angelico7f5f0a5f6764
diff --git a/web/docs/library/get.mdx b/web/docs/library/get.mdxindex 9e0893d8bce..f6cf76b9e5b 100644--- a/web/docs/library/get.mdx+++ b/web/docs/library/get.mdx@@ -24,7 +24,7 @@ import { getSimpleJs, getColumnsJs, getForeignJs, getForeignMultipleJs } from '.js={getSimpleJs}jsHighlight="{7-9}"response={`{- body: [+ "body": [{ "name": "Rio de Janeiro", "country_id": 76 },{ "name": "Beijing", "country_id": 156 },{ "name": "Paris", "country_id": 250 },@@ -32,9 +32,9 @@ import { getSimpleJs, getColumnsJs, getForeignJs, getForeignMultipleJs } from '.{ "name": "Lagos", "country_id": 556 },{ "name": "San Francisco", "country_id": 840 }],- status: 200,- statusCode: 200,- statusText: "OK"+ "status": 200,+ "statusCode": 200,+ "statusText": "OK"}`}/>@@ -47,7 +47,7 @@ import { getSimpleJs, getColumnsJs, getForeignJs, getForeignMultipleJs } from '.js={getColumnsJs}jsHighlight="{9}"response={`{- body: [+ "body": [{ "name": "Rio de Janeiro" },{ "name": "Beijing" },{ "name": "Paris" },@@ -55,9 +55,9 @@ import { getSimpleJs, getColumnsJs, getForeignJs, getForeignMultipleJs } from '.{ "name": "Lagos" },{ "name": "San Francisco" }],- status: 200,- statusCode: 200,- statusText: "OK"+ "status": 200,+ "statusCode": 200,+ "statusText": "OK"}`}/>@@ -69,7 +69,7 @@ import { getSimpleJs, getColumnsJs, getForeignJs, getForeignMultipleJs } from '.js={getForeignJs}jsHighlight="{9-14}"response={`{- body: [+ "body": [{"name": "Brazil","cities": [@@ -107,9 +107,9 @@ import { getSimpleJs, getColumnsJs, getForeignJs, getForeignMultipleJs } from '.]}],- status: 200,- statusCode: 200,- statusText: "OK"+ "status": 200,+ "statusCode": 200,+ "statusText": "OK"}`}/>@@ -125,7 +125,7 @@ the supplier and the purchaser at the same time (both in the `users`) table:js={getForeignMultipleJs}jsHighlight="{9-13}"response={`{- body: [+ "body": [{"id": 1,"purchaser": { "name": "John" },@@ -137,9 +137,9 @@ the supplier and the purchaser at the same time (both in the `users`) table:"supplier": { "name": "Steve" }}],- status: 200,- statusCode: 200,- statusText: "OK"+ "status": 200,+ "statusCode": 200,+ "statusText": "OK"}`}/>diff --git a/web/docs/library/getExamples.js b/web/docs/library/getExamples.jsindex 81b3cce8ef8..2198762662a 100644--- a/web/docs/library/getExamples.js+++ b/web/docs/library/getExamples.js@@ -242,7 +242,7 @@ const createCities = async () => {.from('cities').insert([{ name: 'The Shire', country_id: 554 },- { name: 'Rohan', country_id: 554 },+ { name: 'Rohan', country_id: 555 },])return cities} catch (error) {diff --git a/web/docs/library/post.mdx b/web/docs/library/post.mdxindex 55a5d6c0b44..d9c51555896 100644--- a/web/docs/library/post.mdx+++ b/web/docs/library/post.mdx@@ -23,7 +23,9 @@ import { postSingleJs, postBulkJs } from './getExamples'js={postSingleJs}jsHighlight="{7-11}"response={`{- "body": null,+ "body": [+ { "name": "The Shire", "country_id": 554}+ ],"status": 201,"statusCode": 201,"statusText": "Created"@@ -37,7 +39,10 @@ import { postSingleJs, postBulkJs } from './getExamples'js={postBulkJs}jsHighlight="{7-12}"response={`{- "body": null,+ "body": [+ { "name": "The Shire", "country_id": 554},+ { "name": "Rohan", "country_id": 555}+ ],"status": 201,"statusCode": 201,"statusText": "Created"