Rank 2: Process
Angular / REST for Database / SDK for Auth
Appwrite 1.3.1
Hello 🙂
I've been trying to do this for a few hours, but unfortunately I can't get it to work. I used to have a project entirely through the Appwrite SDK, but now I want to do all database actions through REST.
The get Methods works. But the post/patch dont.
Here is one example:
updateIngredient(ingredient: Ingredient) {
const collectionId = '630f4c60cfef19f89bf6';
return this.http.patch( `${this.baseUrl}/databases/${this.databaseId}/collections/${collectionId}/documents/${ingredient.$id}`, { 'data': { 'name': ingredient.name, 'namePlural': ingredient.namePlural }, 'permissions': ['write("any")'] }, {headers: this.headers} ).pipe( finalize(() => console.log('updateIngredient ' + ingredient.name + ' success')) ) }``` So, with any it works.