minor changes

This commit is contained in:
2017-07-15 03:49:06 +02:00
parent 4ab22d0e6a
commit 808eaa2513
7 changed files with 61 additions and 1287 deletions

View File

@ -238,6 +238,7 @@ namespace Yavsc.Services
public async Task<CalendarService> CreateUserCalendarServiceAsync(string userId)
{
var login = await _dbContext.GetGoogleUserLoginAsync(userId);
if (login == null) return null;
var token = await _flow.LoadTokenAsync(login.ProviderKey, CancellationToken.None);
UserCredential cred = new UserCredential(_flow,login.ProviderKey,token);
return new CalendarService(new BaseClientService.Initializer()