Exemple #1
0
        public string Clear()
        {
            if (_configuration.GetValue <bool>("allowCleanSelf"))
            {
                _logger.LogInformation("Clearing the data...");
                _initializer.ClearAsync(true).Wait();
                _logger.LogInformation("Data deleted.");
                return("{ \"Cleared\": \"true\" }");
            }
            else
            {
                _logger.LogInformation("Self clean not allowed.");
            }

            return("{ \"Cleared\": \"false\" }");
        }
Exemple #2
0
 public async Task InitializeAsync()
 {
     await initializer.ClearAsync(false);
 }