Commit Graph

13 Commits

Author SHA1 Message Date
shockrah
ecb55fa4fe * /badge/update/perms {perms} param is now {badge_perms}
This makes the parameter follow the naming convention of badge_*

* badges.id field now uses BIGINT's as intended

* Typo in sql where 'badges' was incorrectly set to 'perms' -_-
2021-06-07 22:42:26 -07:00
shockrah
03f6624943 * Default values for badge_ids in channels & members 2021-05-20 16:44:30 -07:00
shockrah
fc24ad3430 * Badges now have an optional permissions field
* New struct changes integrating badge system
2021-05-17 16:04:26 -07:00
shockrah
36dbc8dd1e + Badges introduction to database schemas
+ Adding some default empty list values where applicable
neighbors now has a default value of '[]' to enforce the "empty list" constraint on that field
2021-05-17 15:50:53 -07:00
shockrah
c850d42ce1 + Jwt tables - SEE NOTE
! wat - because have to do maintain permissions on a per request level we have
to do this check for permissions at what is basically every level, this does
mean we have to hit the database for a lot of routes however there is a check
that requests go through in order to avoid hitting the database whenever possible

+ rng field in claims now has real purpose
It's purpose is to act as a validator field in the jwt table. By verifying rng
fields we no  longer have to store whole jwt's
2021-05-08 01:29:44 -07:00
shockrah
181b1cadc4 + Exposing serde_json to db-lib lyaer
This dep was already there but just being used (as we're using serde). Now we can use it at the db layer which makes neighbor struct creation easier
* Cargo locks are being updated to reflect new dependancy changes
These changes actually reduce the dependancy count overall
+ Adding a very simple table to hold all the neighbors that an instance may want to reference
At some point we may want to support vanity join urls and this would be a good place to reference those
There would also need to be a way for admins to add/edit/remove vanity urls but that's for another patch
2021-05-06 13:29:32 -07:00
shockrah
75dcb7b73e No more jwt db checks
Also wrapping relevant db code with ok/err checks
2021-03-30 22:45:39 -07:00
shockrah
a1f86fdf6e * Moving away from auto_increment
! Initial id size will stay as u64 but u128 are easily the next major change
This change shouldn't break clients written in high level languages since most already use 128's under the hood anyway
- This commit also removes the auto_increment flag from basically everything that uses RNG id's
2021-03-24 01:14:37 -07:00
shockrah
03c41b6833 - Removed joindate from members schema
+ Auth module now uses std::time for time based calculations
! All time notations are i64 and rounded to the Millisecond

* Moving db pool to a lazy static to avoid constructing a whole pool on every request

+ Adding more logging per request, even if its lazy logging
* Content-Types are now correctly written per type
2021-03-20 19:47:59 -07:00
shockrah
9ce04e96a7 Query string parameter 'type' is now enforced by the api
+ Flag is literally called 'type'
2021-03-12 02:17:06 -08:00
shockrah
ddb08818b1 Updating schemas to support content_type 2021-03-09 00:03:12 -08:00
shockrah
7c3537e4f6 Updated target for debugger
 Tests now use the new flags required for /channels/create
 Doubled size for channel descriptions
2021-03-07 17:46:17 -08:00
shockrah
b67bb6105f Renaming project to json-api for clarity sake 2021-01-24 13:34:17 -08:00