Revert "[aimedb] Pass existing aimeId for duplicated register request"

This reverts commit 0c65740607470953f7697b85f0d7fa1ef67115d4.
This commit is contained in:
Dom Eori 2022-02-26 20:35:39 +09:00
parent e7ced56574
commit 6dd561ca08

View File

@ -53,15 +53,9 @@ 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"));
Card card = cardService.getCardByAccessCode((String) requestMap.get("luid")).get();
resultMap.put("status", 1);
resultMap.put("aimeId", card.getExtId().longValue());
resultMap.put("status", 0);
resultMap.put("aimeId", 0L);
}
logger.info("Response: " + logMapper.write(resultMap));