refacto API prefix + nav.back
This commit is contained in:
parent
bd6ca9d11f
commit
6825f74308
78 changed files with 770 additions and 222 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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"},
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue