From c42ddef7e43ddfaf97d2bc4a50fa2201749477b0 Mon Sep 17 00:00:00 2001 From: Sylvain Briat Date: Thu, 1 Feb 2024 16:55:52 +0100 Subject: [PATCH 1/2] Removed useless status in matching sql request --- .../queries/match/selector/passenger-oriented.selector.ts | 5 +---- src/modules/ad/core/domain/ad.types.ts | 7 ------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/modules/ad/core/application/queries/match/selector/passenger-oriented.selector.ts b/src/modules/ad/core/application/queries/match/selector/passenger-oriented.selector.ts index 92f6b7e..4116167 100644 --- a/src/modules/ad/core/application/queries/match/selector/passenger-oriented.selector.ts +++ b/src/modules/ad/core/application/queries/match/selector/passenger-oriented.selector.ts @@ -1,4 +1,4 @@ -import { AdStatus, Frequency, Role } from '@modules/ad/core/domain/ad.types'; +import { Frequency, Role } from '@modules/ad/core/domain/ad.types'; import { Selector } from '../algorithm.abstract'; import { Waypoint } from '../../../types/waypoint.type'; import { Point } from '../../../types/point.type'; @@ -133,7 +133,6 @@ export class PassengerOrientedSelector extends Selector { private _createWhere = (role: Role): string => [ - this._whereStatus(), this._whereRole(role), this._whereStrict(), this._whereDate(), @@ -145,8 +144,6 @@ export class PassengerOrientedSelector extends Selector { .filter((where: string) => where != '') .join(' AND '); - private _whereStatus = (): string => `status='${AdStatus.VALID}'`; - private _whereRole = (role: Role): string => role == Role.PASSENGER ? 'driver=True' : 'passenger=True'; diff --git a/src/modules/ad/core/domain/ad.types.ts b/src/modules/ad/core/domain/ad.types.ts index 391ad42..10f906b 100644 --- a/src/modules/ad/core/domain/ad.types.ts +++ b/src/modules/ad/core/domain/ad.types.ts @@ -53,10 +53,3 @@ export enum Role { DRIVER = 'DRIVER', PASSENGER = 'PASSENGER', } - -export enum AdStatus { - PENDING = 'PENDING', - VALID = 'VALID', - INVALID = 'INVALID', - SUSPENDED = 'SUSPENDED', -} From 50c5b99e54150be2811da655fe9aaffadb70c669 Mon Sep 17 00:00:00 2001 From: Sylvain Briat Date: Thu, 1 Feb 2024 16:59:58 +0100 Subject: [PATCH 2/2] 1.5.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 480a67a..dfd55f5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mobicoop/matcher", - "version": "1.5.3", + "version": "1.5.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mobicoop/matcher", - "version": "1.5.3", + "version": "1.5.4", "license": "AGPL", "dependencies": { "@grpc/grpc-js": "^1.9.14", diff --git a/package.json b/package.json index 06e1895..301bb84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mobicoop/matcher", - "version": "1.5.3", + "version": "1.5.4", "description": "Mobicoop V3 Matcher", "author": "sbriat", "private": true,