Skip to content

Commit

Permalink
fix: 🐛 rensa upp getChildren anropet och ny release
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikHellman committed Feb 27, 2021
1 parent a8dfab6 commit 2336861
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,13 @@ export class Api extends EventEmitter {
async getChildren(): Promise<Child[]> {
if (this.isFake) return fakeResponse(fake.children())

//--------
const cdnUrl = 'https://etjanst.stockholm.se/vardnadshavare/base/cdn'
const authUrl = 'https://etjanst.stockholm.se/vardnadshavare/base/auth'
const cdnResponse = await this.fetch('cdn_', cdnUrl, this.session)
const cdnResponse = await this.fetch('cdn', routes.cdn, this.session)
const cdn = await cdnResponse.text()

const authResponse = await this.fetch('auth_', authUrl, this.session)
const authResponse = await this.fetch('auth', routes.auth, this.session)
const auth = await authResponse.text()

const rawResponse = await this.fetch('cdn2_', cdn, {
const rawResponse = await this.fetch('createItem', cdn, {
method: 'POST',

headers: {
Expand Down
3 changes: 3 additions & 0 deletions lib/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ export const menu = (childId: string) => (
export const schedule = (childId: string, fromDate: string, endDate: string) => (
`https://etjanst.stockholm.se/vardnadshavare/inloggad2/Calender/GetSchema?childId=${childId}&startDate=${fromDate}&endDate=${endDate}`
)

export const cdn = 'https://etjanst.stockholm.se/vardnadshavare/base/cdn'
export const auth = 'https://etjanst.stockholm.se/vardnadshavare/base/auth'

0 comments on commit 2336861

Please sign in to comment.