public void Post([FromBody] CommonRequestModel model) { try { // validate sign // same appid×tamp must occur once only } catch (Exception ex) { _logger.LogError(ex, "Failed to log"); } }
private static void sendMess(int messType, CommonRequestModel requestModel) { if (SystemHelper.currentUser != null) { requestModel.id = currentUser.id; } createConnection(); CommonMess commonMess = new CommonMess(); commonMess.messType = messType; commonMess.content = JsonHelper.SerializeObject(requestModel); RequestQueue.Add(commonMess); }
public static void register(CommonRequestModel requestModel, RegisterForm registerForm) { SystemHelper.registerForm = registerForm; sendMess(MessType.Register, requestModel); }
public static void Login(CommonRequestModel requestModel, LoginForm loginForm) { SystemHelper.loginForm = loginForm; sendMess(MessType.Login, requestModel); }