Adds /teams route (#373)

* basic list (no grouping yet)

* now groups and checks auth, moved Team::get_many to TeamMember::get_from_team_full_many

* Ran 'cargo sqlx prepare'

* batch TeamMember::get_from_user_id

* Batches before for loop

* Ran 'cargo sqlx prepare'

Co-authored-by: Emma Cypress <emmaffle@modrinth.com>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Ricky12Awesome
2022-07-27 00:40:20 -05:00
committed by GitHub
parent b864791fa6
commit 13335cadc6
4 changed files with 326 additions and 0 deletions

View File

@@ -126,6 +126,8 @@ pub fn users_config(cfg: &mut web::ServiceConfig) {
}
pub fn teams_config(cfg: &mut web::ServiceConfig) {
cfg.service(teams::teams_get);
cfg.service(
web::scope("team")
.service(teams::team_members_get)