1
0
Fork 0
mirror of synced 2024-09-20 03:17:30 +12:00
appwrite/docs/examples/0.13.x/server-nodejs/examples/account/update-prefs.md
Damodar Lohani b2d1d88ffb docs
2022-01-30 15:14:52 +05:45

20 lines
No EOL
494 B
Markdown

const sdk = require('node-appwrite');
// Init SDK
let client = new sdk.Client();
let account = new sdk.Account(client);
client
.setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
.setJWT('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') // Your secret JSON Web Token
;
let promise = account.updatePrefs({});
promise.then(function (response) {
console.log(response);
}, function (error) {
console.log(error);
});