Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate top-level doc updates (#314)
Removes `/doc/:doc_id/as-update` and `/doc/:doc_id/update` endpoints. These are convenient endpoints, but prevent us from decoupling the document management API (metadata) from the documents themselves. This makes it less flexible to deploy Y-Sweet in architectures where the document management API (control plane) is intentionally kept apart from document data (i.e. the data plane). If a developer is developing against the API and _knows_ they will be using a single-process Y-Sweet server (i.e. `y-sweet serve`), they can use the `/d/:doc_id/[as-]update` endpoints (with the server-level bearer token) to get the same behavior. However, the recommended and documented approach is not to rely on the `/d/` endpoints directly, and instead hit the auth endpoint to get the URL for a doc, as that approach is portable across the standalone, Plane, and Cloudflare versions of Y-Sweet.
- Loading branch information