mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-06 13:40:16 +08:00
passing lboptout into validation
This commit is contained in:
parent
d7bf0552de
commit
c36664c00c
2 changed files with 4 additions and 2 deletions
|
@ -5,7 +5,8 @@ export function implemented(): boolean {
|
|||
export function validateResult(
|
||||
_result: object,
|
||||
_version: string,
|
||||
_uaStringifiedObject: string
|
||||
_uaStringifiedObject: string,
|
||||
_lbOptOut: boolean
|
||||
): boolean {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -202,7 +202,8 @@ export async function addResult(
|
|||
!validateResult(
|
||||
result,
|
||||
req.headers["client-version"] as string,
|
||||
JSON.stringify(new UAParser(req.headers["user-agent"]).getResult())
|
||||
JSON.stringify(new UAParser(req.headers["user-agent"]).getResult()),
|
||||
user.lbOptOut === true
|
||||
)
|
||||
) {
|
||||
const status = MonkeyStatusCodes.RESULT_DATA_INVALID;
|
||||
|
|
Loading…
Add table
Reference in a new issue