Skip to content

Commit

Permalink
fix metlo config schema and get metlo config (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilShahi authored Nov 29, 2022
1 parent 6f1dea8 commit c47b4f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions backend/src/api/metlo-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ export const getMetloConfigHandler = async (
res: Response,
): Promise<void> => {
try {
const metloConfig = await getMetloConfig(req.ctx)
let metloConfig = await getMetloConfig(req.ctx)
if (!metloConfig) {
throw new Error404NotFound("No config saved yet.")
metloConfig = {
uuid: "",
configString: "",
}
}
await ApiResponseHandler.success(res, metloConfig)
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/services/metlo-config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ export const METLO_CONFIG_SCHEMA = {
},
},
},
additionalProperties: false,
},
additionalProperties: false,
definitions: {
disable_paths_object: {
type: "object",
Expand Down

0 comments on commit c47b4f6

Please sign in to comment.