File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
2. Web API now calls Microsoft Graph/TodoListService/Controllers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,13 @@ public TodoListController(ITokenAcquisition tokenAcquisition)
39
39
/// /// The Web API will only accept tokens 1) for users, and
40
40
/// 2) having the access_as_user scope for this API
41
41
/// </summary>
42
- static readonly string [ ] scopeRequiredByAPI = new string [ ] { "access_as_user" } ;
42
+ static readonly string [ ] scopeRequiredByApi = new string [ ] { "access_as_user" } ;
43
43
44
44
// GET: api/values
45
45
[ HttpGet ]
46
46
public IEnumerable < TodoItem > Get ( )
47
47
{
48
- HttpContext . VerifyUserHasAnyAcceptedScope ( scopeRequiredByAPI ) ;
48
+ HttpContext . VerifyUserHasAnyAcceptedScope ( scopeRequiredByApi ) ;
49
49
string owner = User . FindFirst ( ClaimTypes . NameIdentifier ) ? . Value ;
50
50
return TodoStore . Where ( t => t . Owner == owner ) . ToList ( ) ;
51
51
}
@@ -54,7 +54,7 @@ public IEnumerable<TodoItem> Get()
54
54
[ HttpPost ]
55
55
public async void Post ( [ FromBody ] TodoItem todo )
56
56
{
57
- HttpContext . VerifyUserHasAnyAcceptedScope ( scopeRequiredByAPI ) ;
57
+ HttpContext . VerifyUserHasAnyAcceptedScope ( scopeRequiredByApi ) ;
58
58
string owner = User . FindFirst ( ClaimTypes . NameIdentifier ) ? . Value ;
59
59
string ownerName ;
60
60
#if ENABLE_OBO
You can’t perform that action at this time.
0 commit comments