aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-07 15:13:09 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-07 15:13:09 -0700
commit72859fb5417733a97ebf4fe11d225d02ebc4c21c (patch)
treeae0157a1d5e18a084b6db4ee7331c2eddcb6abf4
parent651c1a7acf4a141408e7fde670c8f03e2228414b (diff)
downloadfatcat-72859fb5417733a97ebf4fe11d225d02ebc4c21c.tar.gz
fatcat-72859fb5417733a97ebf4fe11d225d02ebc4c21c.zip
truncated oauth_oidc generated username
-rw-r--r--rust/src/endpoint_handlers.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/endpoint_handlers.rs b/rust/src/endpoint_handlers.rs
index 59bc0519..a44861ee 100644
--- a/rust/src/endpoint_handlers.rs
+++ b/rust/src/endpoint_handlers.rs
@@ -596,8 +596,8 @@ impl Server {
let (editor_row, created): (EditorRow, bool) = match existing.first() {
Some((editor, _)) => (editor.clone(), false),
None => {
- let username = format!("{}-{}", params.preferred_username, params.provider)
- .truncate(24);
+ let mut username = format!("{}-{}", params.preferred_username, params.provider);
+ username.truncate(24);
let editor = Editor {
editor_id: None,
username: username,