From af7128e3273e3f70b196b55451b4b9dec0234c1e Mon Sep 17 00:00:00 2001 From: cracrayol Date: Thu, 15 Apr 2021 23:47:00 +0200 Subject: [PATCH] Fix addRival refid check --- popn@asphyxia/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/popn@asphyxia/index.ts b/popn@asphyxia/index.ts index 5d3d639..d7fdbda 100644 --- a/popn@asphyxia/index.ts +++ b/popn@asphyxia/index.ts @@ -48,7 +48,7 @@ export function register() { R.WebUIEvent('addRival', async (data: any) => { const refid = data.refid.trim(); - const profile = await DB.FindOne(refid, { collection: 'profile'}); + const profile = await DB.FindOne(data.rivalid, { collection: 'profile'}); if(profile != undefined && profile != null) { const rivals = await DB.FindOne(refid, { collection: 'rivals' }) || {collection: 'rivals', rivals: []}; if(rivals.rivals.length < 4) {