freechat/server
shockrah dd3bbeabd8 InviteRow structure has some methods listed below:
+ new() -> create a new ready to insert invite
+ from_tuple -> helps us translate db responses into a struct
+ as_json_str -> String which we can use as a json payload(jank but whatever it works with proper headers)

FUnctions:
get_invite_by_code: as the name implies grabs an invite assuming its in our db otherwise None
record_invite_usage: blindly modifies the row in the schema, assumes that if we get to this point we're ok to ignore erroneous possibilities
join_invite_code: main dispatcher for joining using the /invite/join route
create_invite: meant to the be the route handler for creating invites later on
Needed: test module since we've basically reworked the whole auth/invite system in one day
2020-06-02 03:44:33 -07:00
..
migrations added counter to keys table 2020-06-02 00:44:53 -07:00
scripts Rocket config changed to match the .env 2020-03-07 18:50:48 -08:00
src InviteRow structure has some methods listed below: 2020-06-02 03:44:33 -07:00
.env minor config change for development 2020-03-07 16:07:26 -08:00
.gitignore ignoring dev files for sql server 2019-12-01 21:53:07 -08:00
Cargo.lock adding mysql_async to dependancy list 2020-06-01 23:05:06 -07:00
Cargo.toml adding mysql_async to dependancy list 2020-06-01 23:05:06 -07:00
Config.toml moved goalposts LULW 2019-11-12 11:19:44 -08:00
readme.md New smol note regarding state of API server 2020-05-27 20:59:17 -07:00
todo clarified goals 2020-03-17 21:34:43 -07:00
todo.md structures for authentication payloads 2020-02-13 17:13:41 -08:00

Freechat API

Built with rocket this API lets client apps query the server for data like recent messages channels in a server.

What's Being worked on

Authorization model has been implemented and is now being integrated with endpoints where required. Not all endpoints require authentication but really those are more like exceptions rather than the rule as most of this API is behind some kind of authentication.