Server naming fixes and cleanup

Server is now completely cleaned up and without warnings
This commit is contained in:
Pavel Vesely
2020-03-15 09:38:37 +01:00
parent ab3f0853a7
commit 5b3feaf26f
92 changed files with 1223 additions and 1273 deletions

View File

@ -1,13 +1,13 @@
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using Oqtane.Repository;
using Oqtane.Models;
using Oqtane.Shared;
using Oqtane.Infrastructure;
using System;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Oqtane.Infrastructure.Interfaces;
using Oqtane.Repository;
namespace Oqtane.Controllers
{
@ -44,27 +44,27 @@ namespace Oqtane.Controllers
// POST api/<controller>
[HttpPost]
[Authorize(Roles = Constants.HostRole)]
public Job Post([FromBody] Job Job)
public Job Post([FromBody] Job job)
{
if (ModelState.IsValid)
{
Job = _jobs.AddJob(Job);
_logger.Log(LogLevel.Information, this, LogFunction.Create, "Job Added {Job}", Job);
job = _jobs.AddJob(job);
_logger.Log(LogLevel.Information, this, LogFunction.Create, "Job Added {Job}", job);
}
return Job;
return job;
}
// PUT api/<controller>/5
[HttpPut("{id}")]
[Authorize(Roles = Constants.HostRole)]
public Job Put(int id, [FromBody] Job Job)
public Job Put(int id, [FromBody] Job job)
{
if (ModelState.IsValid)
{
Job = _jobs.UpdateJob(Job);
_logger.Log(LogLevel.Information, this, LogFunction.Update, "Job Updated {Job}", Job);
job = _jobs.UpdateJob(job);
_logger.Log(LogLevel.Information, this, LogFunction.Update, "Job Updated {Job}", job);
}
return Job;
return job;
}
// DELETE api/<controller>/5