add storage information route
parent
7e2339cbc8
commit
95f78b3643
|
@ -44,5 +44,14 @@ export default class Account extends Route {
|
||||||
this.handleError(error, res);
|
this.handleError(error, res);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.router.get('/storage', async (req: Req, res) => {
|
||||||
|
try {
|
||||||
|
const data = await this.server.client.redis.get(`storage-${req.account.username}`) ? await this.server.client.redis.get(`storage-${req.account.username}`) : null;
|
||||||
|
res.status(200).json({ code: this.constants.codes.SUCCESS, message: data });
|
||||||
|
} catch (error) {
|
||||||
|
this.handleError(error, res);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue