fix: 🐛 rensa upp getChildren anropet och ny release

This commit is contained in:
Erik Hellman 2021-02-27 12:34:38 +01:00
parent a8dfab6892
commit 2336861a71
2 changed files with 6 additions and 6 deletions

View File

@ -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: {

View File

@ -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'