Remove more deprecated user routes

This commit is contained in:
ShootingStar91
2024-07-12 16:50:01 +03:00
parent e1e01501d3
commit 2eac075ffc
2 changed files with 0 additions and 13 deletions
-12
View File
@@ -4,7 +4,6 @@ import * as jwt from 'jsonwebtoken'
import { SECRET, LOGIN_VALID_MS, USER_CREATION_SECRET } from '../utils/config'
import * as bcrypt from 'bcrypt'
import { nowDb } from '../utils/db'
import { getAllUsers, getUserDetails } from '../services/user'
import { getRole } from '../middlewares/authenticator'
const router = Router()
@@ -38,17 +37,6 @@ router.post('/login', async (req, res) => {
})
})
router.get('/all', async (_req, res) => {
const users = await getAllUsers()
return res.status(200).send(users)
})
router.get('/:id', async (req, res) => {
const id = parseInt(req.params.id)
const user = await getUserDetails(id)
res.status(200).send(user)
})
router.post('/create', async (req, res) => {
// TODO type guards
const { username, password, secret } = req.body
-1
View File
@@ -4,7 +4,6 @@ import { useDispatch } from 'react-redux'
import { Box, Button, CircularProgress, Container, Stack, TextField, Typography } from '@mui/material'
import { useNavigate } from 'react-router-dom'
import { api } from '../redux/api'
import { Role } from '@/types'
export const Login = () => {
const [username, setUsername] = useState('')