Skip to content

Commit

Permalink
lisää lokitusta muistuttajaSearchServiceen
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi korkalainen committed Feb 25, 2025
1 parent 522df20 commit 9a2266f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/mml/kiinteistoHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export async function tuoKarttarajausJaTallennaKiinteistotunnukset(input: TuoKar
if (!config.isProd()) {
kiinteistotunnukset = input.kiinteistotunnukset.map((k) => {
if (k.startsWith("491")) {
return k.replace("491", "998");
return k.replace(/^491/, "998");
}
return k;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class MuistuttajaSearchService {
}

async searchById(id: string[]): Promise<DBMuistuttaja[]> {
log.info("search muistuttajas with ids", { muistuttajaIds: id });
const results = await muistuttajaOpenSearchClient.query({
query: {
terms: {
Expand All @@ -54,6 +55,7 @@ class MuistuttajaSearchService {
}

async getMuistuttajaMaara(oid: string): Promise<number> {
log.info("querying muistuttaja amount for projekti");
const response = await muistuttajaOpenSearchClient.query({
query: {
bool: {
Expand All @@ -72,6 +74,7 @@ class MuistuttajaSearchService {
}

async searchMuistuttajat(params: HaeMuistuttajatQueryVariables): Promise<Muistuttajat> {
log.info("fetching muistuttajat that match query", { oid: params.oid, isMuutMuistuttajat: params.muutMuistuttajat });
const searchResult = await muistuttajaOpenSearchClient.query({
query: this.buildQuery(params),
size: params.size ?? 10000,
Expand Down

0 comments on commit 9a2266f

Please sign in to comment.