Server naming fixes and cleanup
Server is now completely cleaned up and without warnings
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user