Skip to content

Commit 0b1ff2b

Browse files
committed
await checkToken
1 parent c68c716 commit 0b1ff2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dsbmobile",
3-
"version": "1.1.2",
3+
"version": "1.1.3",
44
"description": "A Javascript wrapper for the dsbmobile api",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/dsbmobile.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default class Dsbmobile {
118118
* @returns A new `TimeTable` resource
119119
*/
120120
public async getTimetable(): Promise<TimeTable> {
121-
this.checkToken();
121+
await this.checkToken();
122122
let resp = await this.requester.get(
123123
`/dsbtimetables?authid=${this.token}`,
124124
);
@@ -140,7 +140,7 @@ export default class Dsbmobile {
140140
* @returns A new `NewsPostCollection`
141141
*/
142142
public async getNewsPosts(): Promise<NewsPostCollection> {
143-
this.checkToken();
143+
await this.checkToken();
144144
let resp = await this.requester.get(`/newstab?authid=${this.token}`);
145145

146146
let news: NewsPost[] = [];
@@ -158,7 +158,7 @@ export default class Dsbmobile {
158158
* @returns A new `DocumentPostCollection`
159159
*/
160160
public async getDocumentPosts(): Promise<DocumentPostCollection> {
161-
this.checkToken();
161+
await this.checkToken();
162162
let resp = await this.requester.get(
163163
`/dsbdocuments?authid=${this.token}`,
164164
);

0 commit comments

Comments
 (0)