
wen i am trying to wrap the services on a provider it showing error why ???

import { Client, Databases, Account,ID} from "appwrite";
import conf from "../conf/conf";
export class Services{
client = new Client()
account
databases
constructor(){
this.client.setEndpoint(conf.Appwrite_url)
.setProject(conf.APPWRITE_PROJECT_ID)
this.account=new Account(this.client)
this.databases=new Account(this.client)
}
async register(email, password){
try {
await this.account.create(email,password)
await this.login(email,password)
} catch (error) {
console.log('there is some error in login')
return false
}
}
async login(email,password){
try {
await this.account.createEmailSession(email,password)
} catch (error) {
console.log('there is some error in login')
return false
}
}
async logout(){
try {
await this.account.deleteSessions('current')
} catch (error) {
console.log('there is some error in logout')
}
}
}
const services=new Services()
export default services here is my service file

FYI, it's best to wrap code in backticks to format a bit nicer. You can use 1 backtick for inline code (https://www.markdownguide.org/basic-syntax/#code) and 3 backticks for multiline code (https://www.markdownguide.org/extended-syntax/#syntax-highlighting.
Recommended threads
- Collection Permission issue
I am facing issue in my Pro account. "Add" button is disabled while adding permission in DB collection settings.
- Opened my website after long time and Ba...
I built a website around a year back and and used appwrite for making the backend. At that time the website was working fine but now when i open it the images a...
- Is it possible to cancel an ongoing file...
When uploading a file to storage, is there a way to cancel the upload in progress so the file is not saved or partially stored?
