Saving to DB, need to render
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.IsolatedStorage;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using fxl.codes.kisekae.Models;
|
||||
@@ -16,16 +14,11 @@ namespace fxl.codes.kisekae.Controllers
|
||||
{
|
||||
private readonly DatabaseService _databaseService;
|
||||
private readonly ILogger<HomeController> _logger;
|
||||
private readonly ConfigurationReaderService _readerService;
|
||||
private readonly IsolatedStorageFile _storage;
|
||||
|
||||
public HomeController(ILogger<HomeController> logger, ConfigurationReaderService readerService, DatabaseService databaseService)
|
||||
public HomeController(ILogger<HomeController> logger, DatabaseService databaseService)
|
||||
{
|
||||
_logger = logger;
|
||||
_readerService = readerService;
|
||||
_databaseService = databaseService;
|
||||
|
||||
_storage = IsolatedStorageFile.GetUserStoreForApplication();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
@@ -47,15 +40,6 @@ namespace fxl.codes.kisekae.Controllers
|
||||
return Redirect("/");
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult Select(string directory, string file)
|
||||
{
|
||||
var stream = _storage.OpenFile(Path.Combine(directory, file), FileMode.Open);
|
||||
var model = _readerService.ParseStream(stream, directory);
|
||||
model.Name = file;
|
||||
return View("Play", model);
|
||||
}
|
||||
|
||||
public IActionResult Privacy()
|
||||
{
|
||||
return View();
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using fxl.codes.kisekae.Models;
|
||||
using fxl.codes.kisekae.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@@ -14,8 +11,8 @@ namespace fxl.codes.kisekae.Controllers
|
||||
{
|
||||
_databaseService = databaseService;
|
||||
}
|
||||
|
||||
public async Task<IActionResult> Index(int id, int configId)
|
||||
|
||||
public IActionResult Index(int id, int configId)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user