Skip to content

Commit

Permalink
refactoring work
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Apr 22, 2024
1 parent d3de1f7 commit 8c9de44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/lynx/service/validator_service.ex
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ defmodule Lynx.Service.ValidatorService do
{:ok, email}

user ->
case {user_uuid, user.id == user_uuid} do
case {user_uuid, user.uuid == user_uuid} do
{nil, _} ->
{:error, err}

Expand Down
3 changes: 2 additions & 1 deletion lib/lynx_web/controllers/misc_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ defmodule LynxWeb.MiscController do
admin_email_required: "User email is required",
admin_email_invalid: "User email is invalid",
admin_password_required: "User password is required",
admin_password_invalid: "User password is invalid, It must be alphanumeric and not less than 6 characters"
admin_password_invalid:
"User password is invalid, It must be alphanumeric and not less than 6 characters"
}

with {:ok, _} <- ValidatorService.is_string?(params["app_name"], errs.app_name_required),
Expand Down
6 changes: 4 additions & 2 deletions lib/lynx_web/controllers/user_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ defmodule LynxWeb.UserController do
role_required: "User role is required",
role_invalid: "User role is invalid",
password_required: "User password is required",
password_invalid: "User password is invalid, It must be alphanumeric and not less than 6 characters",
password_invalid:
"User password is invalid, It must be alphanumeric and not less than 6 characters",
email_used: "User email is already used"
}

Expand Down Expand Up @@ -248,7 +249,8 @@ defmodule LynxWeb.UserController do
role_required: "User role is required",
role_invalid: "User role is invalid",
password_required: "User password is required",
password_invalid: "User password is invalid, It must be alphanumeric and not less than 6 characters",
password_invalid:
"User password is invalid, It must be alphanumeric and not less than 6 characters",
email_used: "User email is already used"
}

Expand Down

0 comments on commit 8c9de44

Please sign in to comment.