Falukant production, family and administration enhancements

This commit is contained in:
Torsten Schulz
2025-04-14 15:17:35 +02:00
parent 90b4f51dcb
commit b15d93a798
77 changed files with 2429 additions and 1093 deletions

View File

@@ -89,6 +89,43 @@ class AdminController {
res.status(error.status || 500).json({ error: error.message || 'Internal Server Error' });
}
}
async searchUser(req, res) {
try {
const { userid: userId } = req.headers;
const { userName, characterName } = req.body;
const response = await AdminService.getFalukantUser(userId, userName, characterName);
res.status(200).json(response);
} catch (error) {
console.log(error);
res.status(403).json({ error: error.message });
}
}
async getFalukantUserById(req, res) {
try {
const { userid: userId } = req.headers;
const { id: hashedId } = req.params;
const response = await AdminService.getFalukantUserById(userId, hashedId);
res.status(200).json(response);
} catch (error) {
console.log(error);
res.status(403).json({ error: error.message });
}
}
async changeFalukantUser(req, res) {
try {
const { userid: userId } = req.headers;
const data = req.body;
const { id: falukantUserId, } = req.body;
const response = await AdminService.changeFalukantUser(userId, falukantUserId, data);
res.status(200).json(response);
} catch (error) {
console.log(error);
res.status(403).json({ error: error.message });
}
}
}
export default AdminController;