Skip to content

Commit

Permalink
Home page
Browse files Browse the repository at this point in the history
  • Loading branch information
Oktawian-L committed Nov 9, 2019
1 parent 77ca60d commit e91d54b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
8 changes: 4 additions & 4 deletions SubitonAPI/SubitonAPI/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ public class HomeController : Controller
};

[HttpGet]
public /*IActionResult*/IEnumerable<WeatherForecast> Index()
public IActionResult Index()
{
var rng = new Random();
/*r rng = new Random();
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
})
.ToArray();
.ToArray();*/

// return View();
return View();
}
}
}
1 change: 1 addition & 0 deletions SubitonAPI/SubitonAPI/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddDbContext<DataContext>(x => x.UseSqlite("Data Source =Subiton.db"));
services.AddControllers();
services.AddCors();
services.AddMvc();
//claudinary config
services.Configure<ClaudinarySettings>(Configuration.GetSection("ClaudinarySettings"));
//automapper init
Expand Down
12 changes: 0 additions & 12 deletions SubitonAPI/SubitonAPI/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>@ViewData["Title"] - WebApplication1</title>

<environment include="Development">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/site.css" />
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
</environment>
</head>
<body>
<h1>hello</h1>
Expand Down

0 comments on commit e91d54b

Please sign in to comment.