rename
This commit is contained in:
parent
9c4581d33d
commit
5b35bb603d
2 changed files with 9 additions and 3 deletions
|
|
@ -274,7 +274,9 @@ class ApiRoutesProvider {
|
|||
const publicKey = req.cookies.publicKey;
|
||||
|
||||
const offers =
|
||||
await this.services.offerService.getOffersByPublicKey(publicKey);
|
||||
await this.services.offerService.getActiveOffersByPublicKey(
|
||||
publicKey
|
||||
);
|
||||
|
||||
if (!offers) {
|
||||
return res.status(404).json({
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class OfferServiceProvider {
|
|||
});
|
||||
};
|
||||
|
||||
const getOffersByPublicKey = async (publicKey) => {
|
||||
const getActiveOffersByPublicKey = async (publicKey) => {
|
||||
const activeOffers = await this.models.OfferCreated.findAll({
|
||||
where: {
|
||||
public_key: publicKey,
|
||||
|
|
@ -102,7 +102,11 @@ class OfferServiceProvider {
|
|||
return offersToReturn;
|
||||
};
|
||||
|
||||
return { createOffer, getOffersByPublicKey, deleteOffer };
|
||||
return {
|
||||
createOffer,
|
||||
getActiveOffersByPublicKey,
|
||||
deleteOffer,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue