public async Task <RES_LOGOUT> Process(REQ_LOGOUT requestPacket) { var responseResult = new RES_LOGOUT(); var response = await Data.UserRepository.Logout(requestPacket.AuthToken); if (response != ERROR_CODE.NONE) { return(responseResult.Return(response)); } responseResult.SetResult(response); return(responseResult); }
public async Task <RES_LOGOUT> Process(REQ_LOGOUT requestPacket) { var responseResult = new RES_LOGOUT(); var userObject = await AuthTokenRepository.Check(requestPacket.UserID, requestPacket.AuthToken); if (userObject == false) { return(responseResult.Return(ERROR_CODE.REQ_LOGOUT_FAIL_CHECK_ID_OR_AUTHTOKEN)); } await AuthTokenRepository.Delete(requestPacket.UserID); responseResult.SetResult(ERROR_CODE.NONE); return(responseResult); }