C# refactoring

This commit is contained in:
femsci 2023-10-21 22:27:05 +02:00
parent 6f7d70ec8d
commit cee83f1894
Signed by: femsci
GPG key ID: 08F7911F0E650C67
6 changed files with 1 additions and 25 deletions

View file

@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace Nyanlabs.SFood.Api.Controllers;

View file

@ -1,9 +1,3 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Net.Mail;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Nyanlabs.SFood.Api.Models;
using Nyanlabs.SFood.Api.Services;
@ -22,7 +16,7 @@ public class IncidentController : ControllerBase
private readonly EmailClient _mail;
[HttpPost("submit")]
public async Task<IActionResult> SubmitIncident([FromForm] IncidentSubmission incident)
public async Task<IActionResult> SubmitIncident([FromBody] IncidentSubmission incident)
{
string body = $@"<p>Dziękujemy za zgłoszenie incydentu.<p>
<p>Dane zgłoszenia:<br/>

View file

@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Nyanlabs.SFood.Api.Models;

View file

@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
namespace Nyanlabs.SFood.Api.Models;

View file

@ -1,5 +1,3 @@
using Microsoft.EntityFrameworkCore;
using Nyanlabs.SFood.Api;
using Nyanlabs.SFood.Api.Services;
var builder = WebApplication.CreateBuilder(args);

View file

@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using MailKit.Net.Smtp;
using Microsoft.Extensions.Options;
using MimeKit;