refacto API prefix + nav.back

This commit is contained in:
Paul Schneider 2026-08-20 20:50:52 +01:00
commit 6825f74308
Signed by: notazof
GPG key ID: 1DD5D838E5343B06
78 changed files with 770 additions and 222 deletions

View file

@ -8,8 +8,8 @@ namespace Yavsc.ViewModels.Account
public class RegisterModel
{
[StringLength(YavscConstants.MaxUserNameLength)]
[RegularExpression(YavscConstants.UserNameRegExp)]
[StringLength(Constants.MaxUserNameLength)]
[RegularExpression(Constants.UserNameRegExp)]
[DataType(DataType.Text)]
[Display(Name = "UserName", Description = "User name")]
public string UserName { get; set; }

View file

@ -3,8 +3,10 @@ using Yavsc.Models.Auth;
namespace Yavsc
{
public static class YavscConstants
public static class Constants
{
public const string APIPrefix = "api/v1";
public static readonly Scope[] SiteScopes = {
new Scope { Id = "profile", Description = "Your profile informations" },
new Scope { Id = "book" , Description ="Your booking interface"},

View file

@ -19,7 +19,7 @@ namespace Yavsc.Abstract.Identity
/// </summary>
/// <remarks>
/// Le path retourné est aligné sur
/// <see cref="YavscConstants.AvatarsPath"/> (minuscule).
/// <see cref="Constants.AvatarsPath"/> (minuscule).
/// Les anciens display templates utilisaient "/Avatars/"
/// avec un S majuscule, en désaccord avec le path statique
/// servi par le middleware de fichiers — les images ne
@ -29,8 +29,8 @@ namespace Yavsc.Abstract.Identity
public static string AvatarSrc(IApplicationUser? user)
{
if (user==null || string.IsNullOrWhiteSpace(user?.UserName))
return YavscConstants.DefaultAvatar;
return $"{YavscConstants.AvatarsPath}/{user!.UserName}.s.png";
return Constants.DefaultAvatar;
return $"{Constants.AvatarsPath}/{user!.UserName}.s.png";
}
}
}