mirror of https://github.com/hykilpikonna/AquaDX
[aimedb] Pass existing aimeId for duplicated register request
parent
0d98fe8818
commit
0c65740607
|
@ -53,9 +53,15 @@ public class RegisterHandler implements BaseHandler {
|
|||
resultMap.put("status", 1);
|
||||
resultMap.put("aimeId", card.getExtId().longValue());
|
||||
} else {
|
||||
/* Ongeki workaround: if the card is already registered, it will just return existing aimeId associated with luid.
|
||||
I have strong feeling that we should investigate about register code (13) instead of this hack,
|
||||
but it seems enough for mitigate "ongeki bright" error popup during login process. */
|
||||
logger.warn("Duplicated Aime Card Register detected, access code: {}", requestMap.get("luid"));
|
||||
resultMap.put("status", 0);
|
||||
resultMap.put("aimeId", 0L);
|
||||
|
||||
Card card = cardService.getCardByAccessCode((String) requestMap.get("luid")).get();
|
||||
|
||||
resultMap.put("status", 1);
|
||||
resultMap.put("aimeId", card.getExtId().longValue());
|
||||
}
|
||||
|
||||
logger.info("Response: " + logMapper.write(resultMap));
|
||||
|
|
Loading…
Reference in New Issue