mirror of
https://github.com/BZmHackTeam/BezpiecznaZywnosc
synced 2024-12-22 14:46:58 +01:00
C# refactoring
This commit is contained in:
parent
6f7d70ec8d
commit
cee83f1894
6 changed files with 1 additions and 25 deletions
|
@ -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;
|
||||
|
|
|
@ -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/>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Nyanlabs.SFood.Api;
|
||||
using Nyanlabs.SFood.Api.Services;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue