Commit Graph

17 Commits

Author SHA1 Message Date
projectmoon 9ae4a1b103 Update dependencies. Remove tokio 0.2 compatibility. 2021-01-25 20:38:20 +00:00
projectmoon 4980b2e33b cargo update and major upgrade for tokio, refinery 2021-01-17 12:42:45 +00:00
projectmoon 6d9cdd0269 Implement updating basic info for character name. 2021-01-10 20:45:15 +00:00
projectmoon 6156bba34d Skip loading owner of character for API. 2020-12-31 20:19:45 +00:00
projectmoon ce4e02594d Add ability to pass in custom database path. 2020-12-31 14:11:28 +00:00
projectmoon 62f05060c0 Move migrations to refinery + barrel, enable 'offline' sqlx query checking 2020-12-31 14:11:28 +00:00
projectmoon e148b45edd Convert load user queries to compile-checked 2020-12-31 14:11:28 +00:00
projectmoon fb1c21d710 Clear out unused imports in db.rs 2020-12-31 14:11:28 +00:00
projectmoon 6f9d1e00bc Use sqlx result in db.rs 2020-12-31 14:11:28 +00:00
projectmoon 53501c3747 Convert character db methods to compile-checked queries 2020-12-31 14:11:28 +00:00
projectmoon 5ea07b8953 Rip out Diesel in favor of SQLx.
The primary benefit of this is to avoid Rocket's database integration,
which has become problematic in this codebase with the update to the
new async style. Because the async database API is actually
synchronous under the hood, this introduces some annoying lifetime
requirements that basically force us to use owned data everywhere.

The original pattern was to have a separate data layer that could
invoke queries from `self` (the db connection). By using a true async
database driver, we can get this back, because the lifetimes are once
again flexible instead of the ones forced by Rocket.
2020-12-31 14:11:28 +00:00
projectmoon 1f6f6432e1 Implement editing of attributes. 2020-12-27 21:49:08 +00:00
projectmoon 8c8ed4f6ef Migrate to Rocket 0.5.
Rocket 0.5 is a major uprade, rewriting most of Rocket to be async.
Required many changes through the code, especially the database layer.
The new Rocket async database calls require Futures with 'static
lifetimes.

General:
 - Move to stable rust.
 - Most of codebase is now async.
 - Rocket migrations (e.g. Cookies to CookieJar).

Database:
 - Switched to owned data (&str -> String) for inserts because of the
   'static lifetime requirement on Rocket's DB future.
 - All database methods now asynchronous.

Pages:
 - Changed various routes to async.
 - Needed to add clone calls to some places because we need to use
   owned data multiple times (registration).
2020-12-13 21:58:39 +00:00
projectmoon 8b3e8c70ae Serialize characters as protobufs. Skeletal character creation.
Implements the absolute basics of the character creation flow, AKA
most things are missing. Integrates a method of storing character
data, support for that in the database, and a working character
creation page.

The only thing the page does at the moment is create a hardcoded basic
CofD character sheet and save it to the database. There is no ability
to change game system, fill in extra details, etc. There's also no
ability to edit anything.

Also added basic links to the registration and create new character
pages.
2020-12-07 22:37:18 +00:00
projectmoon 10d5f30e5a User accounts, DAO trait, registration.
Not very thorough, but it does work.
2020-12-05 19:50:11 +00:00
projectmoon 07ebf7233e Load a (non existing) character list on the home page 2020-12-03 23:39:55 +00:00
projectmoon 092da7490f First commit; prototype state. 2020-12-03 19:21:09 +00:00