mirror of
https://github.com/xtr-dev/rondevu-server.git
synced 2025-12-13 20:33:25 +00:00
Fix: Replace all remaining getOffersByService with getOffersForService
This commit is contained in:
@@ -265,7 +265,7 @@ const handlers: Record<string, RpcHandler> = {
|
|||||||
throw new Error('Service not found');
|
throw new Error('Service not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
const offers = await storage.getOffersByService(service.id);
|
const offers = await storage.getOffersForService(service.id);
|
||||||
const availableOffer = offers.find((o) => !o.answererUsername);
|
const availableOffer = offers.find((o) => !o.answererUsername);
|
||||||
|
|
||||||
if (!availableOffer) {
|
if (!availableOffer) {
|
||||||
@@ -304,7 +304,7 @@ const handlers: Record<string, RpcHandler> = {
|
|||||||
compatibleServices[
|
compatibleServices[
|
||||||
Math.floor(Math.random() * compatibleServices.length)
|
Math.floor(Math.random() * compatibleServices.length)
|
||||||
];
|
];
|
||||||
const offers = await storage.getOffersByService(randomService.id);
|
const offers = await storage.getOffersForService(randomService.id);
|
||||||
const availableOffer = offers.find((o) => !o.answererUsername);
|
const availableOffer = offers.find((o) => !o.answererUsername);
|
||||||
|
|
||||||
if (!availableOffer) {
|
if (!availableOffer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user