Move projects to src; add Neutrino secret

This commit is contained in:
Holden
2026-06-19 22:52:38 -05:00
parent 2cfc5e7369
commit 95751904fa
90 changed files with 32 additions and 10 deletions

View File

@@ -0,0 +1,28 @@
using System.Text.Json.Serialization;
using API.Contracts.Neutrino.Enums;
namespace API.Contracts.Neutrino.Responses;
// {"ResultCode":1,"UserId":"their user id","Nickname":"splotybean"}
public class NeutrinoAuthenticateResponse : NeutrinoResultCodeResponse
{
public static NeutrinoAuthenticateResponse Success(string userId, string nickname) => new()
{
ResultCode = (byte)AuthenticationResultCode.AuthenticationSuccessful,
UserId = userId,
Nickname = nickname
};
public static NeutrinoAuthenticateResponse Failure(AuthenticationResultCode error) => new()
{
ResultCode = (byte)error
};
[JsonPropertyName(name: "UserId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? UserId { get; set; }
[JsonPropertyName(name: "Nickname")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Nickname { get; set; }
}