Rename createUser to newUser for consistency

This commit is contained in:
Elias Schriefer 2021-12-11 18:45:48 +01:00
parent 33ade65420
commit 9a52c072d3
2 changed files with 7 additions and 7 deletions

12
Cargo.lock generated
View File

@ -814,9 +814,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.110" version = "0.2.109"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b58a4469763e4e3a906c4ed786e1c70512d16aa88f84dded826da42640fc6a1c" checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01"
[[package]] [[package]]
name = "libsqlite3-sys" name = "libsqlite3-sys"
@ -1130,9 +1130,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]] [[package]]
name = "pkg-config" name = "pkg-config"
version = "0.3.23" version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1a3ea4f0dd7f1f3e512cf97bf100819aa547f36a6eccac8dbaae839eb92363e" checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe"
[[package]] [[package]]
name = "ppv-lite86" name = "ppv-lite86"
@ -1317,9 +1317,9 @@ dependencies = [
[[package]] [[package]]
name = "ryu" name = "ryu"
version = "1.0.6" version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" checksum = "254df5081ce98661a883445175e52efe99d1cb2a5552891d965d2f5d0cad1c16"
[[package]] [[package]]
name = "safemem" name = "safemem"

View File

@ -492,7 +492,7 @@ pub struct Mutation;
#[graphql_object(context = Context)] #[graphql_object(context = Context)]
impl Mutation { impl Mutation {
async fn createUser(context: &Context, new_user: NewUser) -> FieldResult<ID> { async fn newUser(context: &Context, new_user: NewUser) -> FieldResult<ID> {
let user: User = new_user.clone().into(); let user: User = new_user.clone().into();
if !is_valid_user_name(&user.user_name) { if !is_valid_user_name(&user.user_name) {
return Err(format!("{:?} is not a valid username", user.user_name).into()); return Err(format!("{:?} is not a valid username", user.user_name).into());