From 8d8dd6a3ad57b05bcf061a82392261c28609272b Mon Sep 17 00:00:00 2001 From: Daniel Gyulai Date: Thu, 12 Nov 2020 11:21:43 +0100 Subject: [PATCH] Change minio host to match helm chart, various minor fixes --- CoviDok/BLL/MinioHandler.cs | 2 +- CoviDok/BLL/Session/Session.cs | 5 +++-- CoviDok/Controllers/AuthController.cs | 2 +- CoviDok/Controllers/ImagesController.cs | 2 +- CoviDok/api/Request/AuthRegistration.cs | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CoviDok/BLL/MinioHandler.cs b/CoviDok/BLL/MinioHandler.cs index ade76bd..3193b6e 100644 --- a/CoviDok/BLL/MinioHandler.cs +++ b/CoviDok/BLL/MinioHandler.cs @@ -10,7 +10,7 @@ namespace CoviDok.BLL { class MinioHandler { - private MinioClient Client = null; + private readonly MinioClient Client = null; public MinioHandler(string Host, string AccessKey, string SecretKey) { diff --git a/CoviDok/BLL/Session/Session.cs b/CoviDok/BLL/Session/Session.cs index d6405b4..07f5237 100644 --- a/CoviDok/BLL/Session/Session.cs +++ b/CoviDok/BLL/Session/Session.cs @@ -1,4 +1,5 @@ -using System; +using CoviDok.Api; +using System; using System.Collections.Generic; using System.Text; @@ -7,7 +8,7 @@ namespace CoviDok.BLL public class Session { public string ID { get; set; } - public string Type { get; set; } + public Role Type { get; set; } public DateTime LastAccess { get; set; } } } diff --git a/CoviDok/Controllers/AuthController.cs b/CoviDok/Controllers/AuthController.cs index b5696c6..78df420 100644 --- a/CoviDok/Controllers/AuthController.cs +++ b/CoviDok/Controllers/AuthController.cs @@ -48,7 +48,7 @@ namespace CoviDok.Controllers // System.Diagnostics.Debug.WriteLine(authRegistration.ToString()); // Validate Email GenericResponse genericResponse = new GenericResponse(); - if (authRegistration.Email == "a") + if (authRegistration.Email == "a@domain.tld") { genericResponse.Status = Status.Error; genericResponse.Body["reason"] = authRegistration.Email + " is already registered!"; diff --git a/CoviDok/Controllers/ImagesController.cs b/CoviDok/Controllers/ImagesController.cs index 6147d01..9dfb957 100644 --- a/CoviDok/Controllers/ImagesController.cs +++ b/CoviDok/Controllers/ImagesController.cs @@ -15,7 +15,7 @@ namespace CoviDok.Controllers public class ImagesController : ControllerBase { private MinioHandler MinioHandler = new MinioHandler( - "192.168.0.160:9000", + "minio:9000", "secretaccesskey", "secretsecretkey"); private readonly string BucketName = "test1"; diff --git a/CoviDok/api/Request/AuthRegistration.cs b/CoviDok/api/Request/AuthRegistration.cs index 6dcb297..cf31e27 100644 --- a/CoviDok/api/Request/AuthRegistration.cs +++ b/CoviDok/api/Request/AuthRegistration.cs @@ -11,6 +11,7 @@ namespace CoviDok.Api.Request public string LastName { get; set; } public string Email { get; set; } public string Password { get; set; } + public string Phone { get; set; } public Role Role { get; set; } public override string ToString() {