-
Notifications
You must be signed in to change notification settings - Fork 0
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
signup signin models added #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Прочитай что написал, и напиши прямо там, что думаешь
mockServer/index.js
Outdated
@@ -0,0 +1,35 @@ | |||
const express = require('express'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Убрать mockServer и всё, что с ним связано
actionName: "SUCCESS_SIGNUP" | ||
}); | ||
} catch (error) { | ||
state["signUp_errorMessage"] = "у нас не получилось залогинить вас в систему" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может здесь просто редиректить на страницу входа?
По этой ошибке внутри компоненты редирект на страницу входа
@@ -11,11 +11,11 @@ class SignUpValidator { | |||
if (data.password !== data.passwordRepeat) { | |||
res.password__errorMessage = "пароли не совпадают"; | |||
res.passwordRepeat__errorMessage = "пароли не совпадают"; | |||
res.status = 0; | |||
res.wasError = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А может просто error вместо wasError?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И делать не 1 в ошибке, а нормальный класс ошибки с описанием и т.п?
@@ -1,6 +1,6 @@ | |||
const serverUrl = 'http://80.252.155.65:8010/api'; | |||
const serverUrl = 'http://80.252.155.65:8000/api/v0'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Давай вынесем ip в переменную окружения, а то постоянно залетает на гит ?
src/models/authModel.js
Outdated
|
||
|
||
|
||
// static signUp (userData = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если не нужно — убрать
case "USER_SIGNUP": | ||
SignUpLogic.execLogic(payload,this.state) | ||
break; | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Согласен, лучше отдельно
No description provided.