Exemplo n.º 1
0
        public async Task <IActionResult> OpIn([FromRoute] Guid uid, [FromBody] invops_in varinvops_in)
        {
            TerminalMessage result = new TerminalMessage();

            result.message = await _terminalService.Operation_in(uid, varinvops_in);

            return(Ok(result));
        }
Exemplo n.º 2
0
        //[AllowAnonymous]
        public async Task <IActionResult> Postinvops_in([FromBody] invops_in varinvops_in)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            string result = "";
            var    uid    = User.GetUserId();

            result = await _terminalService.Operation_in(uid, varinvops_in);

            if (result == "OK")
            {
                return(CreatedAtAction("Getinvops_in", new { id = varinvops_in.invops_inId }, varinvops_in));
            }
            else
            {
                return(BadRequest(result));
            }
        }