Skip to content

v23.08

Latest

Choose a tag to compare

@geoffrey-wu geoffrey-wu released this 03 May 04:37
· 1049 commits to main since this release

Changes to how tossups and bonuses are represented in the MongoDB database.

  • A new packets collection exists. The _id of a packet corresponds to the original _id of the packets originally stored as embedded documents in the sets collection. In addition, packet documents no longer store an array of the tossups and bonuses they contain, as that data was previous unreliable and inaccurate. Set documents no longer store the packets they contain, but packet documents do store the _id of the sets they contain.
  • The set parameter on tossup and bonus documents now contains an embedded document. The previous value, the _id of the set that the tossup/bonus belonged to, is now stored in the set_id field. This embedded document contains the following fields:
set: {
    _id: ObjectId,
    name: string,
    year: number,
}
  • The packet parameter on tossup and bonus documents now contains an embedded document. The previous value, the _id of the set that the tossup/bonus belonged to, is now stored in the packet_id field. This embedded document contains the following fields:
packet: {
    _id: ObjectId,
    name: string,
    number: number,
}
  • The set_id, packet_id, setYear, setName, packetName, and packetNumber fields are deprecated and will be removed in a future release. As a reminder, the type field is still deprecated.
    • As an alternative, use the fields in the embedded documents stored in the set and packet fields. In MongoDB methods, these fields can be accessed by using quotes and dot notation, such as set.year.
    • If there is a v5.0.0, these fields will be removed by then. Otherwise, warning will be provided when these fields are removed.
  • Similar changes were made to the packet field of geoword documents, but since no external API relies on these (or should), this isn't given as much attention.
  • For details about code changes, see #203

Other Changes

  • #192: Add graphs showing individual stats
  • #194: Fix issue where geoword ranking is wrong
  • #195: answer-checking: fix issue where close years would almost always be accepted
  • #198: Fix category selection bug in database
  • Fix issues with packet numbers at the end of a set
  • Update list of contributors in about page
  • Fix multiplayer bug where tossup is undefined on connection
  • By default, don't test timing functions when running npm test
  • Test random question functions in correctness test (makes sure they run without throwing errors)
  • Fix bug where setName parameter in stats would never match anything
  • Don't authenticate nodeMailer if no API key is provided
  • Avoid destructuring function parameters when unnecessary
  • Fix missing awaits and wrong return types
  • can finally visit https://qbreader.org and be redirected to the main site (previously, including the https and omitting the www would cause the page to load forever)
  • Remove unnecessary client-side logging
  • Cleaned up singleplayer code organization to resemble multiplayer code
    • Removed unnecessary createTossupCard parameter
    • Don't record bonus stats when not logged in
  • Store "powermarked tossups only" setting in localStorage
  • Fix issue where non-three part bonuses would appear, even when the setting was applied
  • Increase database limit (max query return length) to 10000
  • Add default values and explicit array support to all parameters of /api/query
  • Reorganize /api, /auth, /geoword endpoint code
  • Less laggy multiplayer reading
  • Change email address to noreply@qbreader.org

Answer Checking

  • Fix bug where extractKeyWords would not extract all key words, allowing some insufficient answers to be accepted
  • Add typo correction for "contentinal" -> "continental"
  • Remove HTML tags when checking answer
  • Only accept answer abbreviations (i.e. first letter of every word) longer than one letter

Geoword

  • in /geoword/compare: fix issue where ties would result in both players getting a tossup
  • By default, geoword functions use user_id, not username
  • Record geoword prompt trail
  • Fix geoword audio not playing on safari
  • Fix issue where getAudio could crash server

Full Changelog: 23.07...23.08