feat(ui): simplify to 3-button manage layout and remove drawer grouping
Build and Push Fridger Container / Build & Push Fridger Image (push) Successful in 1m36s
Build and Push Fridger Container / Build & Push Fridger Image (push) Successful in 1m36s
This commit is contained in:
@@ -188,6 +188,30 @@ app.patch('/api/items/:id/quantity', (req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
// Add whole packet (+1 full pack size)
|
||||
app.post('/api/items/:id/add-packet', (req, res) => {
|
||||
try {
|
||||
const count = parseInt(req.body.count, 10) || 1;
|
||||
const item = db.addPacket(req.params.id, count);
|
||||
if (!item) return res.status(404).json({ error: 'Item not found' });
|
||||
res.json(item);
|
||||
} catch (err) {
|
||||
res.status(500).json({ error: err.message });
|
||||
}
|
||||
});
|
||||
|
||||
// Remove whole packet (-1 full pack size)
|
||||
app.post('/api/items/:id/remove-packet', (req, res) => {
|
||||
try {
|
||||
const count = parseInt(req.body.count, 10) || 1;
|
||||
const item = db.removePacket(req.params.id, count);
|
||||
if (!item) return res.status(404).json({ error: 'Item not found' });
|
||||
res.json(item);
|
||||
} catch (err) {
|
||||
res.status(500).json({ error: err.message });
|
||||
}
|
||||
});
|
||||
|
||||
// Delete item
|
||||
app.delete('/api/items/:id', (req, res) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user