Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pickup slot shows -1 available places #6

Open
ottojo opened this issue Sep 6, 2023 · 1 comment
Open

pickup slot shows -1 available places #6

ottojo opened this issue Sep 6, 2023 · 1 comment

Comments

@ottojo
Copy link
Owner

ottojo commented Sep 6, 2023

 TRACE my_mensa_lib > Calling API url: https://togo.my-mensa.de/5ecb878c-9f58-4aa0-bb1b/ulm19c552/api/get_free_slots/
 TRACE my_mensa_lib > Response: Response { url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("togo.my-mensa.de")), port: None, path: "/5ecb878c-9f58-4aa0-bb1b/ulm19c552/api/get_free_slots/", query: None, fragment: None }, status: 200, headers: {"server": "nginx", "date": "Wed, 06 Sep 2023 20:28:04 GMT", "content-type": "application/json", "transfer-encoding": "chunked", "connection": "keep-alive", "expires": "Thu, 19 Nov 1981 08:52:00 GMT", "cache-control": "no-store, no-cache, must-revalidate", "pragma": "no-cache", "set-cookie": "mmp_5b9fa=8s2c19oi05vq5f0q34mpipsihm; path=/", "vary": "Accept-Encoding", "x-powered-by": "PleskLin"} }
 TRACE my_mensa_lib > Text: "{\"11:30:00\":81,\"12:00:00\":86,\"12:30:00\":85,\"13:00:00\":87,\"13:30:00\":-1}"
Free slots for 2023-09-07:
  11:30:00: 81
  12:00:00: 86
  12:30:00: 85
  13:00:00: 87
  13:30:00: -1

site does not display last entry

@ottojo
Copy link
Owner Author

ottojo commented Sep 6, 2023

The webapp just filters that

slotsClean: function() {
    let slotsClean = {};
    $.each(this.slots, function(zeitstart, rest) {
        if (rest != -1) {
            slotsClean[zeitstart] = rest;
        }
    })
    console.log('slotsrange2', {
        slotsClean,
        slots: this.slots
    })
    return slotsClean;
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant