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