Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolves #1020 #1021 corrects information about username length and character … #1041

Merged
merged 2 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api-docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2715,7 +2715,7 @@
"newUsername": {
"in": "query",
"name": "new_username",
"description": "The new username for the user, preferably the user's email address. Must be 3-50 characters in length; allowed characters are alphanumberic and -_@.",
"description": "The new username for the user, preferably the user's email address. Must be 3-128 characters in length; allowed characters are alphanumeric and -_@.",
"required": false,
"schema": {
"type": "string"
Expand Down
2 changes: 1 addition & 1 deletion schemas/user/create-user-request.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"properties": {
"username": {
"type": "string",
"description": "Preferably the user's email address. Must be 3-50 characters in length; allowed characters are alphanumberic and -_@."
"description": "Preferably the user's email address. Must be 3-128 characters in length; allowed characters are alphanumeric and -_@."
},
"name": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion src/controller/org.controller/org.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function parseError (req, res, next) {
function isValidUsername (val) {
const value = val.match(/^[A-Za-z0-9\-_@.]{3,128}$/)
if (value == null) {
throw new Error('Username should be 3-128 characters. Allowed characters are alphanumberic and -_@.')
throw new Error('Username should be 3-128 characters. Allowed characters are alphanumeric and -_@.')
}
return true
}
Expand Down
2 changes: 1 addition & 1 deletion src/swagger.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ const doc = {
newUsername: {
in: 'query',
name: 'new_username',
description: 'The new username for the user, preferably the user\'s email address. Must be 3-50 characters in length; allowed characters are alphanumberic and -_@.',
description: 'The new username for the user, preferably the user\'s email address. Must be 3-128 characters in length; allowed characters are alphanumeric and -_@.',
required: false,
schema: {
type: 'string'
Expand Down