![]() + 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 |
||
---|---|---|
.. | ||
migrations | ||
scripts | ||
src | ||
.env | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
Config.toml | ||
readme.md | ||
todo | ||
todo.md |
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.