Code Monkey home page Code Monkey logo

donation-tracker's People

Contributors

aofengen avatar bcutler-work avatar bsstephan avatar coolmatty avatar dependabot-preview[bot] avatar dependabot[bot] avatar edmund-huber avatar faultyserver avatar goldbattle avatar hippocrates avatar jdeng89 avatar justanr avatar uraniumanchor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

donation-tracker's Issues

Commentators missing from runs

I'm working on a little Go library and Matrix bot which right now relies on parsing /schedule. I only recently discovered /tracker and it actually having an API which is fantastic compared to scraping the HTML.

In trying to transition my client and bot to using /tracker/api/v1/search?run&event=ID to get the schedule for an event, I've discovered one snafu. The API does not return the hosts/commentators for a run. The commentators field is always "". I do get this from /schedule so I imagine there is a way to get the info, but I can't figure it out.

In the same vein, I noticed deprecated_runners and the runners array instead, but the latter only returns the runner ID, which would result in me having to do a bajillion more queries. Is there any way, through a query param or otherwise, to get that information inlined instead? It's been close to a decade since I last worked on a Django codebase so I'm a little lost trying to figure this out.

I realise we're close to an event so just wanted to say Thank You for everything and Good Luck!

Broken class on donation page

When looking at the html I found one of the classes were broken on the donation page
image

It seems that its an issue with the variable commentstate on the templates/tracker/donation.html page

v2 API mostly returns HTTP 500s

Looking at the endpoints for v2, I get the following patterns:

tracker/ api/v2/ ^events/$ [name='event-list']
tracker/ api/v2/ ^events\.(?P<format>[a-z0-9]+)/?$ [name='event-list']
tracker/ api/v2/ ^events/(?P<pk>[^/.]+)/$ [name='event-detail']
tracker/ api/v2/ ^events/(?P<pk>[^/.]+)\.(?P<format>[a-z0-9]+)/?$ [name='event-detail']
tracker/ api/v2/ ^runners/$ [name='runner-list']
tracker/ api/v2/ ^runners\.(?P<format>[a-z0-9]+)/?$ [name='runner-list']
tracker/ api/v2/ ^runners/(?P<pk>[^/.]+)/$ [name='runner-detail']
tracker/ api/v2/ ^runners/(?P<pk>[^/.]+)\.(?P<format>[a-z0-9]+)/?$ [name='runner-detail']
tracker/ api/v2/ ^runs/$ [name='speedrun-list']
tracker/ api/v2/ ^runs\.(?P<format>[a-z0-9]+)/?$ [name='speedrun-list']
tracker/ api/v2/ ^runs/(?P<pk>[^/.]+)/$ [name='speedrun-detail']
tracker/ api/v2/ ^runs/(?P<pk>[^/.]+)\.(?P<format>[a-z0-9]+)/?$ [name='speedrun-detail']
tracker/ api/v2/ ^$ [name='api-root']
tracker/ api/v2/ ^\.(?P<format>[a-z0-9]+)/?$ [name='api-root']
tracker/ api/v2/ api-auth/ login/ [name='login']
tracker/ api/v2/ api-auth/ logout/ [name='logout'] 

However, trying to request /events/ seems to always return an HTTP 500:

$ curl https://gamesdonequick.com/tracker/api/v2/events/ -H "Accept: application/json" -vv

< HTTP/2 500 
< date: Sat, 15 May 2021 12:03:19 GMT
< content-type: text/html; charset=utf-8
< vary: Accept-Language, Cookie
< content-language: en

Server done blowed up

Varying the "Accept" header doesn't seem to matter either.

I get the same for just about any /events endpoint, /runs/ times out and some of the /run/ endpoints seem to also just 500 across the board.

I tried it with a local copy of donation-tracker, and in that case doing a request like curl http://localhost:8000/tracker/api/v2/events/ -vv doesn't blow up:

*   Trying ::1:8000...
* connect to ::1 port 8000 failed: Connection refused
*   Trying 127.0.0.1:8000...
* Connected to localhost (127.0.0.1) port 8000 (#0)
> GET /tracker/api/v2/events/ HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.76.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< Vary: Accept, Cookie
< Allow: GET, HEAD, OPTIONS
< X-Frame-Options: SAMEORIGIN
< Content-Length: 2
< 
* Connection #0 to host localhost left intact
[]

Once I add an event to the database, things start to blow up locally too:

  • /events/ returns:
    Exception Type: TemplateDoesNotExist
    Exception Value: rest_framework/api.html
  • /events.json or /events.json/ returns:
    Exception Type: TypeError at /tracker/api/v2/events.json
    Exception Value: list() got an unexpected keyword argument 'format'

Based on what I'm seeing, is the v2 API in a state where it's expected to work and be used?

[Feature Request] Jump to current time in /schedule

It would be very convenient for mobile users to be able to jump to the current time in the schedule instead of having to manually scroll. Highlighting the current run in the schedule would also make it much easier to determine at a glance.

I'm not sure if this repo is currently accepting PR's, but I would be glad to contribute!

Incentive amount allocated before changing donation amount invalidates settings

At /tracker/ui/donate, if a donation amount is set and then an incentive is selected, the incentive allocation could end up being greater than the donation amount if the donation amount gets changes. This results in the following error on the page:

Unable to update the settings, those are invalid: [Error: The value [25] being set falls outside of the minimumValue [0.00] and maximumValue [2.00] range set for this element]

Steps to reproduce:

  1. Navigate to /tracker/ui/donate (e.g. https://gamesdonequick.com/tracker/ui/donate/28)
  2. Enter a donation amount (e.g. $25.00)
  3. Under Incentives, select Add Incentives
  4. Select an incentive (e.g. a bonus game incentive, which will pre-allocate the donation amount to the incentive)
  5. Return to the donation amount and alter the amount so that the donation amount is less than the incentive amount. (e.g. backspace the 5 in 25 to change the value to 26. The value will temporarily be 2.)
  6. Notice that the donation form is replaced with an error message and a stacktrace (included below.

Stacktrace:
Error: Unable to update the settings, those are invalid: [Error: The value [50] being set falls outside of the minimumValue [0.00] and maximumValue [25.00] range set for this element] at Function.value (https://gamesdonequick.com/static/tracker/gen/tracker-tracker-cc34d87aaade3b948e1b.js:39:102542) at e.value (https://gamesdonequick.com/static/tracker/gen/tracker-tracker-cc34d87aaade3b948e1b.js:39:195909) at t.value (https://gamesdonequick.com/static/tracker/gen/tracker-tracker-cc34d87aaade3b948e1b.js:39:75611) at Ao (https://gamesdonequick.com/static/tracker/gen/tracker-tracker-cc34d87aaade3b948e1b.js:23:51474) at Xa (https://gamesdonequick.com/static/tracker/gen/tracker-tracker-cc34d87aaade3b948e1b.js:23:69469) at Cs (https://gamesdonequick.com/static/tracker/gen/tracker-tracker-cc34d87aaade3b948e1b.js:23:105897) at Al (https://gamesdonequick.com/static/tracker/gen/tracker-tracker-cc34d87aaade3b948e1b.js:23:90221) at Nl (https://gamesdonequick.com/static/tracker/gen/tracker-tracker-cc34d87aaade3b948e1b.js:23:90146) at Sl (https://gamesdonequick.com/static/tracker/gen/tracker-tracker-cc34d87aaade3b948e1b.js:23:87486) at https://gamesdonequick.com/static/tracker/gen/tracker-tracker-cc34d87aaade3b948e1b.js:23:45816

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.