From e2c365238db831afe7ae1ce1af9834830befeaf0 Mon Sep 17 00:00:00 2001 From: Daniel Gyulai Date: Sat, 31 Oct 2020 14:00:53 +0100 Subject: [PATCH] Improve API --- CoviDok/Api/{Response.cs => GenericResponse.cs} | 10 ++++++++-- CoviDok/Api/Response/AuthIdentity.cs | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) rename CoviDok/Api/{Response.cs => GenericResponse.cs} (64%) create mode 100644 CoviDok/Api/Response/AuthIdentity.cs diff --git a/CoviDok/Api/Response.cs b/CoviDok/Api/GenericResponse.cs similarity index 64% rename from CoviDok/Api/Response.cs rename to CoviDok/Api/GenericResponse.cs index 11d9837..4a65b10 100644 --- a/CoviDok/Api/Response.cs +++ b/CoviDok/Api/GenericResponse.cs @@ -5,10 +5,16 @@ using System.Threading.Tasks; namespace CoviDok.Api { - public class Response + public class GenericResponse { public int Version { get; set; } - public string Status { get; set; } + public Status Status { get; set; } public Dictionary Body = new Dictionary(); } + + public enum Status + { + Error, + Success + } } diff --git a/CoviDok/Api/Response/AuthIdentity.cs b/CoviDok/Api/Response/AuthIdentity.cs new file mode 100644 index 0000000..babd2ee --- /dev/null +++ b/CoviDok/Api/Response/AuthIdentity.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CoviDok.Api.Response +{ + public class AuthIdentity + { + public string Id { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public Role Role { get; set; } + } +}