This commit is contained in:
2019-09-24 19:45:07 +00:00
parent c6a20c7ffc
commit 4089f87f54

View File

@@ -42,6 +42,7 @@ namespace qbridge.Controllers
[HttpGet] [HttpGet]
public IActionResult Get([FromQuery]string state, [FromQuery]string code) public IActionResult Get([FromQuery]string state, [FromQuery]string code)
{ {
//https://localhost:5001/oauthredirect?state=bar&code=foo
return Content($"State: {state}, Code: {code}"); return Content($"State: {state}, Code: {code}");
} }
@@ -74,23 +75,23 @@ namespace qbridge.Controllers
*/ */
// POST: api/Todo // POST: api/Todo
[HttpPost] // [HttpPost]
public async Task<ActionResult<QItem>> Post(QCreds creds) // public async Task<ActionResult<QItem>> Post(QCreds creds)
{ // {
var q = new QItem(); // var q = new QItem();
q.Token1 = "Test token 1"; // q.Token1 = "Test token 1";
q.Token2 = System.DateTime.Now.ToString(); // q.Token2 = System.DateTime.Now.ToString();
q.Token3 = creds.Login; // q.Token3 = creds.Login;
return Ok(q); // return Ok(q);
//return CreatedAtAction(nameof(GetTodoItem), new { id = item.Id }, item); // //return CreatedAtAction(nameof(GetTodoItem), new { id = item.Id }, item);
} // }
public class QCreds // public class QCreds
{ // {
public string Login { get; set; } // public string Login { get; set; }
public string Password { get; set; } // public string Password { get; set; }
} // }
// ************************************************************************************************************* // *************************************************************************************************************