+5
-1
@@ -71,7 +71,11 @@ export function createApp(config: RuntimeConfig, deps: AppDependencies) {
|
||||
}
|
||||
|
||||
function readCountRequest(req: Request): CountRequest {
|
||||
const repo = typeof req.query.repo === "string" ? req.query.repo.trim() : "";
|
||||
const repo = typeof req.query.repo === "string"
|
||||
? req.query.repo.trim()
|
||||
: typeof req.query.query === "string"
|
||||
? req.query.query.trim()
|
||||
: "";
|
||||
if (!repo) {
|
||||
throw new HttpError(400, "Missing repo query parameter");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user