Update the series view command to be in greyscale if the user has not claimed the card #297
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
import {createCanvas, loadImage} from "canvas";
|
||||
import path from "path";
|
||||
import AppLogger from "../client/appLogger";
|
||||
import {existsSync, readFileSync} from "fs";
|
||||
import {existsSync} from "fs";
|
||||
import Inventory from "../database/entities/app/Inventory";
|
||||
import Jimp from "jimp";
|
||||
|
||||
|
@ -36,7 +36,7 @@ export default class ImageHelper {
|
|||
continue;
|
||||
}
|
||||
|
||||
let imageData = await Jimp.read(filePath);
|
||||
const imageData = await Jimp.read(filePath);
|
||||
|
||||
if (userId != null) {
|
||||
const claimed = await Inventory.FetchOneByCardNumberAndUserId(userId, card.id) != null;
|
||||
Vylpes marked this conversation as resolved
Outdated
|
||||
|
|
Loading…
Reference in a new issue
This should also actually check the Quantity of the inventory, not just if it exists