Almost finish implementing client side

This commit is contained in:
2025-11-06 20:22:16 +02:00
parent a847779582
commit a891a686fd
42 changed files with 6450 additions and 57 deletions

View File

@@ -8,6 +8,7 @@ public record CreateTagDto(
TagType Type,
[Required]
[StringLength(64)]
[RegularExpression(@"^[a-zA-Z0-9-]+$", ErrorMessage = "The name must only contain alphanumeric characters and hyphens.")]
string Name
);

View File

@@ -0,0 +1,14 @@
using T120B165_ImgBoard.Models;
namespace T120B165_ImgBoard.Dtos.Tag;
public record TagDto(string Name, TagType Type)
{
public static TagDto FromTag(Models.Tag tag)
{
return new TagDto(
Name: tag.Name,
Type: tag.Type
);
}
};