Skip to content

Commit

Permalink
Merge pull request #4 from ABI-Deployment-Thesis/ruiar/change-http-ap…
Browse files Browse the repository at this point in the history
…i-endpoints

fix(http): change http api endpoints
  • Loading branch information
ruigomes99 authored Aug 27, 2024
2 parents fab0c4c + 3e07f38 commit 274beeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<h2 align="center">ABI Deployment Thesis - Access Control</h2>

Welcome to the access-control repository! This project is a key part of a master's thesis at the University of Minho. It's a Proof of Concept for a proposed architecture designed to deploy and integrate intelligent models within ABI (Adaptive Business Intelligence) systems.
Welcome to the access-control repository! This project is a key part of a master's thesis at the University of Minho. It's a Proof of Concept for a proposed architecture designed to deploy and integrate intelligent models within Adaptive Business Intelligence (ABI) systems.

**This repository provides the microservice responsible for user management and authentication.**

Expand Down
2 changes: 1 addition & 1 deletion config/mongodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const con = async function () {
const init = async function () {
try {
const admin = await new User({
_id: new mongoose.Types.ObjectId(),
_id: new mongoose.Types.ObjectId("66c8d271f5b68d63c5a232c1"),
email: '[email protected]',
password: await bcrypt.hashString('admin'),
name: 'admin'
Expand Down
8 changes: 4 additions & 4 deletions http/routes/user.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const userController = require('../controllers/user.controller')
const { isAuthenticated } = require('../middleware')
const validator = require('../validator')

router.get('/user/:id', isAuthenticated, validator.getUserById, userController.getUserById)
router.get('/user-by-email/:email', isAuthenticated, validator.getUserByEmail, userController.getUserByEmail)
router.post('/user', validator.saveUser, userController.saveUser)
router.put('/delete/user', isAuthenticated, validator.deleteUser, userController.deleteUser)
router.get('/users/:id', isAuthenticated, validator.getUserById, userController.getUserById)
router.get('/users-by-email/:email', isAuthenticated, validator.getUserByEmail, userController.getUserByEmail)
router.post('/users', validator.saveUser, userController.saveUser)
//router.put('/delete/users', isAuthenticated, validator.deleteUser, userController.deleteUser) // Requires implementation of user roles/permissions

module.exports = router

0 comments on commit 274beeb

Please sign in to comment.