mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-14 22:37:22 -05:00
Fix NASC registration path
This commit is contained in:
@@ -95,13 +95,17 @@ async function NASCMiddleware(request: express.Request, response: express.Respon
|
||||
return;
|
||||
}
|
||||
|
||||
const nexAccount: HydratedNEXAccountDocument | null = await NEXAccount.findOne({ pid });
|
||||
let nexAccount: HydratedNEXAccountDocument | null = null;
|
||||
if (pid) {
|
||||
nexAccount = await NEXAccount.findOne({ pid });
|
||||
|
||||
if (!nexAccount || nexAccount.access_level < 0) {
|
||||
response.status(200).send(nascError('102').toString());
|
||||
return;
|
||||
if (!nexAccount || nexAccount.access_level < 0) {
|
||||
response.status(200).send(nascError('102').toString());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let device: HydratedDeviceDocument | null = await Device.findOne({
|
||||
fcdcert_hash: fcdcertHash,
|
||||
});
|
||||
@@ -164,7 +168,7 @@ async function NASCMiddleware(request: express.Request, response: express.Respon
|
||||
|
||||
try {
|
||||
// Create new NEX account
|
||||
const nexAccount: HydratedNEXAccountDocument = new NEXAccount({
|
||||
nexAccount = new NEXAccount({
|
||||
device_type: '3ds',
|
||||
password
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user