fix: only disable equipping/unequipping in a fight
authorxangelo <me@xangelo.ca>
Thu, 17 Aug 2023 15:11:32 +0000 (11:11 -0400)
committerxangelo <me@xangelo.ca>
Thu, 17 Aug 2023 15:11:32 +0000 (11:11 -0400)
src/server/api.ts

index 96adb4e69df9fddc4c9fc7a3dff86eba712878fc..923e716bba6ee4571987fa99ec072269389ec565 100644 (file)
@@ -451,13 +451,13 @@ app.post('/player/stat/:stat', authEndpoint, async (req: AuthRequest, res: Respo
   res.send(renderPlayerBar(req.player, equippedItems) + renderProfilePage(req.player));
 });
 
-app.get('/player/skills', authEndpoint, blockPlayerInFight, async (req: AuthRequest, res: Response) => {
+app.get('/player/skills', authEndpoint, async (req: AuthRequest, res: Response) => {
   const skills = await getPlayerSkills(req.player.id);
 
   res.send(renderSkills(skills));
 });
 
-app.get('/player/inventory', authEndpoint, blockPlayerInFight, async (req: AuthRequest, res: Response) => {
+app.get('/player/inventory', authEndpoint, async (req: AuthRequest, res: Response) => {
   const [inventory, items] = await Promise.all([
     getInventory(req.player.id),
     getPlayersItems(req.player.id)