fix: correct name for fetch token

This commit is contained in:
Christian Landgren 2023-10-06 14:51:11 +02:00
parent 53ee3c1cad
commit b0764cf65a
1 changed files with 1 additions and 1 deletions

View File

@ -366,7 +366,7 @@ export class ApiAdmentum extends EventEmitter implements Api {
if (!this.isLoggedIn) {
throw new Error('Not logged in...')
}
const token = await this.fetch('get-messages', apiUrls.messages)
const token = await this.fetch('get-token', apiUrls.messages)
.then((res) => res.text())
.then((html) => /token:\s+'(.*)'/.exec(html)?.pop()) // HACK: this could probably be found at a better place than the html code..