2022-12-27 01:17:28 +13:00
|
|
|
import { Client, Account } from "appwrite";
|
|
|
|
|
|
|
|
const client = new Client();
|
|
|
|
|
|
|
|
const account = new Account(client);
|
|
|
|
|
|
|
|
client
|
2023-04-29 02:06:30 +12:00
|
|
|
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
|
2022-12-27 01:17:28 +13:00
|
|
|
.setProject('5df5acd0d48c2') // Your project ID
|
|
|
|
;
|
|
|
|
|
|
|
|
const promise = account.updatePassword('password');
|
|
|
|
|
|
|
|
promise.then(function (response) {
|
|
|
|
console.log(response); // Success
|
|
|
|
}, function (error) {
|
|
|
|
console.log(error); // Failure
|
|
|
|
});
|