General cleanup: fix some bugs, some refactoring (#65)

* Merged mod file upload in version creation, mod creation and
  version file add to one function;  This makes sure that they are
  consistent
* Made some fields on `User` optional: `github_id`, `avatar_url`, `bio`.
    * We may not want to publicly show the `github_id` to everyone
      with access to the API
    * If we allow non-github users, some of those fields would be
      invalid; some oauth providers may not have avatars or bios
* Made CORS origins should configurable
* Made `--reconfigure-indices` and `--reset-indices` exit after
  completion instead of starting the server
This commit is contained in:
Aeledfyr
2020-10-01 00:07:52 -05:00
committed by GitHub
parent 43a791db65
commit c4fb7b7928
16 changed files with 318 additions and 561 deletions

View File

@@ -2,7 +2,6 @@ use super::ids::Base62Id;
use crate::models::users::UserId;
use serde::{Deserialize, Serialize};
//TODO Implement Item for teams
/// The ID of a team
#[derive(Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(from = "Base62Id")]
@@ -26,6 +25,6 @@ pub struct TeamMember {
pub user_id: UserId,
/// The name of the user
pub name: String,
///The role of the use in the team
/// The role of the user in the team
pub role: String,
}