supprerssion du dossier images dans l'api et remise du localStorage normalement pas de probleme
continuous-integration/drone/push Build is passing Details

blazor
PATRICK 1 year ago
parent a46804be63
commit df18a11acc

@ -238,7 +238,10 @@ namespace Minecraft.Crafting.Api.Controllers
throw new Exception("Unable to get the users.");
}
var defaultImage = Convert.ToBase64String(System.IO.File.ReadAllBytes("Images/default.jpeg"));
string projectPath = @"C:\Users\PATRICK\Source\Repos\SAE_2A_Anglais2\Project";
string imagePath = Path.Combine(projectPath, "adminBlazor", "Images", "default.jpeg");
var defaultImage = Convert.ToBase64String(System.IO.File.ReadAllBytes(imagePath));
var imageTranslation = new Dictionary<string, string>
{
@ -333,7 +336,6 @@ namespace Minecraft.Crafting.Api.Controllers
{
throw new Exception($"Unable to found the item with ID: {id}");
}
//itemOriginal.Id = item.Id;
itemOriginal.Name = item.Name;
itemOriginal.Surname = item.Surname;
@ -343,6 +345,7 @@ namespace Minecraft.Crafting.Api.Controllers
itemOriginal.Password = item.Password;
itemOriginal.Roles = item.Roles;
itemOriginal.Group = item.Group;
if(item.ImageBase64 != null)
itemOriginal.ImageBase64 = item.ImageBase64;
System.IO.File.WriteAllText("Data/users.json", JsonSerializer.Serialize(data, _jsonSerializerOptions));

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

@ -59,7 +59,6 @@ namespace adminBlazor.Factories
item.ExtraTime = user.ExtraTime;
if (user.Group != 0)
item.Group = user.Group;

@ -27,7 +27,7 @@ namespace adminBlazor.Pages
/// <summary>
/// The default enchant categories.
/// The default roles.
/// </summary>
private List<string> roles = new List<string>() { "admin", "teacher", "student" };

@ -25,10 +25,11 @@ var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddSingleton<WeatherForecastService>();
builder.Services.AddScoped<IDataService, DataLocalService>();
builder.Services.AddScoped<IDataService, DataApiService>();
builder.Services.AddScoped<IDataService, DataApiService>();
//builder.Services.AddScoped<IDataService, DataLocalService>();
builder.Services.AddScoped<IVocListService, VocListLocalService>();

Loading…
Cancel
Save