Comment tweaks
This commit is contained in:
@@ -27,12 +27,13 @@ docker-compose up --build
|
|||||||
There are external components to this template referred to as "microservices". These can be omitted entirely by simply removing the React component that accesses them.
|
There are external components to this template referred to as "microservices". These can be omitted entirely by simply removing the React component that accesses them.
|
||||||
|
|
||||||
* News Server: https://github.com/krgamestudios/news-server
|
* News Server: https://github.com/krgamestudios/news-server
|
||||||
|
* Auth Server: https://github.com/krgamestudios/auth-server
|
||||||
* Chat Server: https://github.com/krgamestudios/chat-server
|
* Chat Server: https://github.com/krgamestudios/chat-server
|
||||||
|
|
||||||
# TODO list
|
# TODO list
|
||||||
|
|
||||||
- Account system
|
- Account system
|
||||||
- A separate user settings page
|
- A separate authentication server
|
||||||
- Administration Panel
|
- Administration Panel
|
||||||
- inspect aggregate user data
|
- inspect aggregate user data
|
||||||
- Moderation tools for banning, suspending, or chat-banning users
|
- Moderation tools for banning, suspending, or chat-banning users
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ const defaultAdminAccount = async () => {
|
|||||||
hash: await bcrypt.hash('password', await bcrypt.genSalt(11))
|
hash: await bcrypt.hash('password', await bcrypt.genSalt(11))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//TODO: (1) Replace this default admin account password with UUID
|
||||||
console.log(`Created default admin account (email: admin@${process.env.WEB_ADDRESS}; password: password)`);
|
console.log(`Created default admin account (email: admin@${process.env.WEB_ADDRESS}; password: password)`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ const router = express.Router();
|
|||||||
//middleware
|
//middleware
|
||||||
router.use((req, res, next) => {
|
router.use((req, res, next) => {
|
||||||
//make sure the account is an admin
|
//make sure the account is an admin
|
||||||
if (req.cookies['admin'] !== process.env.SESSION_ADMIN) {
|
if (req.cookies['admin'] !== process.env.SESSION_ADMIN) { //TODO: Eew not good.
|
||||||
return res.status(401).send('invalid admin status');
|
return res.status(401).send('invalid admin status');
|
||||||
} else {
|
} else {
|
||||||
next();
|
next();
|
||||||
|
|||||||
Reference in New Issue
Block a user