api/match: accept object as single argument
hi im what i do
This commit is contained in:
parent
93f2a6b226
commit
8cee4e58c5
2 changed files with 34 additions and 33 deletions
|
@ -213,9 +213,11 @@ export const runAPI = (express, app, __dirname) => {
|
|||
}
|
||||
|
||||
try {
|
||||
const result = await match(
|
||||
parsed.host, parsed.patternMatch, normalizedRequest
|
||||
);
|
||||
const result = await match({
|
||||
host: parsed.host,
|
||||
patternMatch: parsed.patternMatch,
|
||||
params: normalizedRequest,
|
||||
});
|
||||
|
||||
res.status(result.status).json(result.body);
|
||||
} catch {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue