Skip to content

Commit 363bda0

Browse files
author
William Duncan
committed
add 401 & 403 extra returns if token is string
1 parent 6199da9 commit 363bda0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gen/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export function addExtraReturns(schema: Schema): Schema {
5656
* @returns The modified operation
5757
*/
5858
function addExtraReturnsToOperation(operation: Schema.Operation): Schema.Operation {
59-
if (operation.token !== undefined)
59+
if (typeof operation.token === "string")
6060
operation.returns.push({
6161
status: 401,
6262
type: 'Error & {code: "UNAUTHORIZED"}'

0 commit comments

Comments
 (0)