Changeset 057037b for backend/DTOs


Ignore:
Timestamp:
04/11/22 15:29:19 (3 years ago)
Author:
Danilo <danilo.najkov@…>
Branches:
master
Children:
7a983b0
Parents:
b66b3ac
Message:

backend full

Location:
backend/DTOs
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • backend/DTOs/AuthenticateRequest.cs

    rb66b3ac r057037b  
    66{
    77    [Required]
    8     public string Username { get; set; }
     8    public string Email { get; set; }
    99
    1010    [Required]
  • backend/DTOs/AuthenticateResponse.cs

    rb66b3ac r057037b  
    11using backend.Entities;
     2using Newtonsoft.Json;
    23
    34namespace backend.Models;
     
    67public class AuthenticateResponse
    78{
     9    [JsonProperty]
    810    public int Id { get; set; }
    9     public string Username { get; set; }
     11    [JsonProperty]
     12    public string Email { get; set; }
     13    [JsonProperty]
    1014    public string Token { get; set; }
    11 
    12 
    13     public AuthenticateResponse(User user, string token)
    14     {
    15         Id = user.Id;
    16         Username = user.Username;
    17         Token = token;
    18     }
    1915}
Note: See TracChangeset for help on using the changeset viewer.