Skip to content

Commit

Permalink
Merge pull request #66 from alercebroker/fix/targets-view
Browse files Browse the repository at this point in the history
fix parser json
  • Loading branch information
Demurest authored Dec 13, 2024
2 parents f2ab829 + 1d90301 commit eb50b82
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/target/infrastructure/TargetParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class TargetParser {
toDomain(
response: TargetListApiResponse | TargetEditApiResponse
): Result<ITargetData, ParseError> {
// prettier-ignore
try {
const target = new Target({
id: response.id,
Expand All @@ -19,7 +20,7 @@ export class TargetParser {
radius: response.radius,
dec: response.dec,
ra: response.ra,
filter: response.filter ? response.filter : { fields: {}, filters: [] },
filter: response.filter ? response.filter : { "fields": {}, "filters": [] },
nMatches: "n_matches" in response ? response.n_matches : 0,
lastMatch: "last_match" in response ? response.last_match : "",
});
Expand Down

0 comments on commit eb50b82

Please sign in to comment.