Просмотр исходного кода

authorization and token with redax

serg1557733 1 год назад
Родитель
Сommit
1b3c63804a
2 измененных файлов с 1 добавлено и 3 удалено
  1. 0 2
      backend/app.js
  2. 1 1
      frontend/src/App.js

+ 0 - 2
backend/app.js

@@ -54,9 +54,7 @@ const getOneUser = async (userName) => {
     const userInDb = await User.findOne({userName});
     return userInDb;
 }
-
 app.post('/login', async (req, res) => {
-    
     try {
         const {userName,password} = req.body;
         console.log(userName,password)

+ 1 - 1
frontend/src/App.js

@@ -7,7 +7,7 @@ import { store } from './store';
 export default function App() {
 
     const token = useSelector(state => state.userDataReducer.token) 
-
+    
     return token ? <ChatPage /> : <LoginForm/>
 };