1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-13 23:03:19 +00:00

stub out sync, connect to server, print results

This commit is contained in:
Kyle Spearrin
2017-05-12 13:12:30 -04:00
parent a46eb796f8
commit 0f5fdefb34
3 changed files with 87 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
using Bit.Core.Models;
using Bit.Core.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -185,7 +186,9 @@ namespace Bit.Console
if(Core.Services.AuthService.Instance.Authenticated)
{
Core.Services.AuthService.Instance.LogOut();
Con.ForegroundColor = ConsoleColor.Green;
Con.WriteLine("You have successfully logged out!");
Con.ResetColor();
}
else
{
@@ -269,7 +272,7 @@ namespace Bit.Console
return Task.FromResult(0);
}
private static Task SyncAsync()
private static async Task SyncAsync()
{
if(!Core.Services.AuthService.Instance.Authenticated)
{
@@ -282,9 +285,11 @@ namespace Bit.Console
else
{
Con.WriteLine("Syncing...");
await Sync.SyncAllAsync();
Con.ForegroundColor = ConsoleColor.Green;
Con.WriteLine("Syncing complete.");
Con.ResetColor();
}
return Task.FromResult(0);
}
private static string ReadSecureLine()