commit
37edad86db
@ -0,0 +1,58 @@
|
||||
@using WF_WebAdmin.Model;
|
||||
|
||||
@page "/add"
|
||||
|
||||
<h3>Ajouter une Question</h3>
|
||||
|
||||
|
||||
<EditForm Model="@QuizModel" OnValidSubmit="@HandleValidSubmit">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
|
||||
<p>
|
||||
<label for="display-quest">
|
||||
Question:
|
||||
<InputText id="display-quest" @bind-Value="QuizModel.Question" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="display-a">
|
||||
Réponse A:
|
||||
<InputText id="display-a" @bind-Value="QuizModel.AnswerA" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="display-b">
|
||||
Réponse B:
|
||||
<InputText id="display-b" @bind-Value="QuizModel.AnswerB" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="display-c">
|
||||
Réponse C:
|
||||
<InputText id="display-c" @bind-Value="QuizModel.AnswerC" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="display-d">
|
||||
Réponse D:
|
||||
<InputText id="display-d" @bind-Value="QuizModel.AnswerD" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="cA">
|
||||
Bonne réponse:
|
||||
<input name="cA" type="radio" @onchange="@(e => OnCAwnserChange("A", e.Value))" /> A
|
||||
<input name="cA" type="radio" @onchange="@(e => OnCAwnserChange("B", e.Value))" /> B
|
||||
<input name="cA" type="radio" @onchange="@(e => OnCAwnserChange("C", e.Value))" /> C
|
||||
<input name="cA" type="radio" @onchange="@(e => OnCAwnserChange("D", e.Value))" /> D
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</EditForm>
|
@ -0,0 +1,48 @@
|
||||
@using WF_WebAdmin.Model
|
||||
@page "/edit/{Id:int}"
|
||||
|
||||
<h3>Editer</h3>
|
||||
|
||||
<EditForm Model="@quoteModel" OnValidSubmit="@HandleValidSubmit">
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
|
||||
<p>
|
||||
<label for="display-cit">
|
||||
Citation:
|
||||
<InputText id="display-cit" @bind-Value="quoteModel.Content" />
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="lang">
|
||||
Langue:
|
||||
<input name="lang" type="radio" @onchange="@(e => OnlangChange("fr", e.Value))" /> fr
|
||||
<input name="lang" type="radio" @onchange="@(e => OnlangChange("en", e.Value))" /> en
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="charac">
|
||||
<InputSelect id="charac" @bind-Value="quoteModel.Charac">
|
||||
@foreach (Character display in charac)
|
||||
{
|
||||
<option value="@display.caracter">@display.caracter (ID: @display.id_caracter)</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label for="src">
|
||||
<InputSelect id="src" @bind-Value="quoteModel.TitleSrc">
|
||||
@foreach (Source display in src)
|
||||
{
|
||||
<option value="@display.title">@display.title (ID: @display.id_source)</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
</EditForm>
|
@ -0,0 +1,69 @@
|
||||
@using WF_WebAdmin.Model
|
||||
@page "/modifquiz"
|
||||
|
||||
<PageTitle>Gestion des question</PageTitle>
|
||||
|
||||
<h3>Gestion des quiz</h3>
|
||||
|
||||
<div>
|
||||
<NavLink class="btn btn-primary" href="Add" Match="NavLinkMatch.All">
|
||||
<i class="fa fa-plus"></i> Ajouter
|
||||
</NavLink>
|
||||
</div>
|
||||
|
||||
<DataGrid TItem="Quiz"
|
||||
Data="@quiz"
|
||||
PageSize="@MaxValue"
|
||||
ReadData="@OnReadData"
|
||||
TotalItems="@totalItem"
|
||||
ShowPager
|
||||
Responsive>
|
||||
|
||||
<DataGridColumn TItem="Quiz" Field="@nameof(Quiz.Id)" Caption="Id"/>
|
||||
<DataGridColumn TItem="Quiz" Field="@nameof(Quiz.Question)" Caption="Rep A" />
|
||||
<DataGridColumn TItem="Quiz" Field="@nameof(Quiz.AnswerA)" Caption="Rep A" />
|
||||
<DataGridColumn TItem="Quiz" Field="@nameof(Quiz.AnswerB)" Caption="Rep B" />
|
||||
<DataGridColumn TItem="Quiz" Field="@nameof(Quiz.AnswerC)" Caption="Rep C" />
|
||||
<DataGridColumn TItem="Quiz" Field="@nameof(Quiz.AnswerD)" Caption="Rep D" />
|
||||
<DataGridColumn TItem="Quiz" Field="@nameof(Quiz.CAnswer)" Caption="Bonne Rep" />
|
||||
<DataGridColumn TItem="Quiz" Field="@nameof(Quiz.Id)" Caption="Action">
|
||||
<DisplayTemplate>
|
||||
<button type="button" class="btn btn-primary" @onclick="() => OnEditButtonClicked(context)"><i class="fa fa-edit"></i> Editer</button>
|
||||
<button type="button" class="btn btn-primary" @onclick="() => OnDelete(context)"><i class="fa fa-trash"></i> Supprimer</button>
|
||||
</DisplayTemplate>
|
||||
</DataGridColumn>
|
||||
</DataGrid>
|
||||
|
||||
@if (showEditQuiz && selectedQuiz != null)
|
||||
{
|
||||
<div class="divPopup">
|
||||
<div class="contentPopup">
|
||||
<p>Modifier les informations de l'utilisateur :</p>
|
||||
<label>Question:</label>
|
||||
<input type="text" @bind="selectedQuiz.Question"/>
|
||||
<label>Rep A:</label>
|
||||
<input type="text" @bind="selectedQuiz.AnswerA" />
|
||||
<label>Rep B:</label>
|
||||
<input type="text" @bind="selectedQuiz.AnswerB" />
|
||||
<label>Rep C:</label>
|
||||
<input type="text" @bind="selectedQuiz.AnswerC" />
|
||||
<label>Rep D:</label>
|
||||
<input type="text" @bind="selectedQuiz.AnswerD" />
|
||||
<label>Bonne Rep:</label>
|
||||
<input type="text" @bind="selectedQuiz.CAnswer" />
|
||||
<button @onclick="EditQuiz">Sauvegarder </button>
|
||||
<button @onclick="ClosePopup">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (showPopupDelete)
|
||||
{
|
||||
<div class="divPopup">
|
||||
<div class="contentPopup">
|
||||
<p>Êtes-vous sûr de vouloir supprimer ce quiz ?</p>
|
||||
<button @onclick="RemoveQuote">Confirmer</button>
|
||||
<button @onclick="ClosePopup">Annuler</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
using Blazorise.DataGrid;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WF_WebAdmin.Model;
|
||||
using WF_WebAdmin.Service;
|
||||
|
||||
namespace WF_WebAdmin.Pages
|
||||
{
|
||||
public partial class ModifQuiz
|
||||
{
|
||||
private Quiz[] quiz;
|
||||
|
||||
private int MaxValue = 5;
|
||||
|
||||
private int totalItem;
|
||||
|
||||
private bool showEditQuiz = false;
|
||||
|
||||
private Quiz? selectedQuiz;
|
||||
|
||||
private bool showPopupDelete = false;
|
||||
|
||||
private int page = 1;
|
||||
|
||||
[Inject]
|
||||
public IQuizService QuizService { get; set; }
|
||||
|
||||
private async Task OnReadData(DataGridReadDataEventArgs<Quiz> e)
|
||||
{
|
||||
if (e.CancellationToken.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var response = await QuizService.getSommeQuiz(e.PageSize, e.Page);
|
||||
|
||||
if (!e.CancellationToken.IsCancellationRequested)
|
||||
{
|
||||
totalItem = await QuizService.getNbQuiz();
|
||||
quiz = response.ToArray();
|
||||
page = e.Page;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEditButtonClicked(Quiz quiz)
|
||||
{
|
||||
if (quiz == null) return;
|
||||
selectedQuiz = quiz;
|
||||
showEditQuiz = true;
|
||||
}
|
||||
|
||||
private void ClosePopup()
|
||||
{
|
||||
showEditQuiz = false;
|
||||
showPopupDelete = false;
|
||||
selectedQuiz = null;
|
||||
}
|
||||
|
||||
private async Task EditQuiz()
|
||||
{
|
||||
await QuizService.updateQuiz(selectedQuiz);
|
||||
selectedQuiz = null;
|
||||
ClosePopup();
|
||||
}
|
||||
|
||||
private void OnDelete(Quiz q)
|
||||
{
|
||||
selectedQuiz = q;
|
||||
showPopupDelete = true;
|
||||
}
|
||||
|
||||
private async void RemoveQuote()
|
||||
{
|
||||
if (selectedQuiz != null)
|
||||
{
|
||||
await QuizService.removeQuiz(selectedQuiz.Id);
|
||||
selectedQuiz = null;
|
||||
var response = await QuizService.getSommeQuiz(MaxValue, page);
|
||||
quiz = response.ToArray();
|
||||
}
|
||||
showPopupDelete= false;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
using WF_WebAdmin.Model;
|
||||
|
||||
namespace WF_WebAdmin.Service
|
||||
{
|
||||
public interface IQuizService
|
||||
{
|
||||
public Task addQuiz(Quiz quiz);
|
||||
|
||||
public Task updateQuiz(Quiz quiz);
|
||||
|
||||
public Task removeQuiz(int id);
|
||||
|
||||
public Task validateQuiz(int id);
|
||||
|
||||
public Task<List<Quiz>> getQuizzes();
|
||||
|
||||
public Task<List<Quiz>> getQuizzesToValidate();
|
||||
|
||||
public Task<Quiz> getQuiz(int id);
|
||||
|
||||
public Task<List<Quiz>> getSommeQuiz(int nb, int page);
|
||||
|
||||
public Task<int> getNbQuiz();
|
||||
}
|
||||
}
|
||||
|
@ -1,25 +0,0 @@
|
||||
using WF_WebAdmin.Model;
|
||||
|
||||
namespace WF_WebAdmin.Service;
|
||||
|
||||
public class QuizService
|
||||
{
|
||||
public List<Quiz> GetQuizToConfirm()
|
||||
{
|
||||
var res = new List<Quiz>();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public bool AddQuiz(Quiz quiz)
|
||||
{
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
|
||||
public bool RemoveQuiz(Quiz quiz)
|
||||
{
|
||||
var res = false;
|
||||
return res;
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
using System.Text.Json;
|
||||
using WF_WebAdmin.Model;
|
||||
|
||||
namespace WF_WebAdmin.Service;
|
||||
|
||||
public class QuizServiceStub: IQuizService
|
||||
{
|
||||
private readonly string _jsonFilePath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "fake_data_quiz.json");
|
||||
|
||||
public async Task saveQuizJson(List<Quiz> quizzes)
|
||||
{
|
||||
var json = JsonSerializer.Serialize(quizzes, new JsonSerializerOptions { WriteIndented = true });
|
||||
await File.WriteAllTextAsync(_jsonFilePath, json);
|
||||
}
|
||||
|
||||
public async Task addQuiz(Quiz quiz)
|
||||
{
|
||||
var data = await getQuizzes();
|
||||
quiz.Id = data.Count > 0 ? data.Max(p => p.Id) + 1 : 1;
|
||||
data.Add(quiz);
|
||||
await saveQuizJson(data);
|
||||
}
|
||||
|
||||
public async Task updateQuiz(Quiz quiz)
|
||||
{
|
||||
var data = await getQuizzes();
|
||||
var existingQuiz = data.FirstOrDefault(q => q.Id == quiz.Id);
|
||||
if (existingQuiz != null)
|
||||
{
|
||||
existingQuiz.Question = quiz.Question;
|
||||
existingQuiz.AnswerA = quiz.AnswerA;
|
||||
existingQuiz.AnswerB = quiz.AnswerB;
|
||||
existingQuiz.AnswerC = quiz.AnswerC;
|
||||
existingQuiz.AnswerD = quiz.AnswerD;
|
||||
existingQuiz.CAnswer = quiz.CAnswer;
|
||||
existingQuiz.IsValid = quiz.IsValid;
|
||||
existingQuiz.UserProposition = quiz.UserProposition;
|
||||
await saveQuizJson(data);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task removeQuiz(int id)
|
||||
{
|
||||
var data = await getQuizzes();
|
||||
var quiz = data.FirstOrDefault(q => q.Id == id);
|
||||
if (quiz != null)
|
||||
{
|
||||
data.Remove(quiz);
|
||||
await saveQuizJson(data);
|
||||
}
|
||||
}
|
||||
|
||||
public Task validateQuiz(int id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<List<Quiz>> getQuizzes()
|
||||
{
|
||||
if (!File.Exists(_jsonFilePath))
|
||||
{
|
||||
Console.Out.WriteLine($"{_jsonFilePath} not found");
|
||||
return new List<Quiz>();
|
||||
}
|
||||
|
||||
var json = await File.ReadAllTextAsync(_jsonFilePath);
|
||||
return JsonSerializer.Deserialize<List<Quiz>>(json) ?? new List<Quiz>();
|
||||
}
|
||||
|
||||
public async Task<List<Quiz>> getQuizzesToValidate()
|
||||
{
|
||||
var quizzes = await getQuizzes();
|
||||
return quizzes.Where(quiz => quiz.IsValid == false).ToList();
|
||||
}
|
||||
|
||||
public async Task<Quiz> getQuiz(int id)
|
||||
{
|
||||
var data = await getQuizzes();
|
||||
var q = data.FirstOrDefault(p => p.Id == id);
|
||||
if (q != null)
|
||||
{
|
||||
return q;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public async Task<List<Quiz>> getSommeQuiz(int nb, int page)
|
||||
{
|
||||
var data = await getQuizzes();
|
||||
if ((page - 1) * nb + nb > data.Count())
|
||||
{
|
||||
if(nb > data.Count())
|
||||
{
|
||||
return data.GetRange(0, data.Count()-1);
|
||||
}
|
||||
return data.GetRange(data.Count() - nb, nb);
|
||||
}
|
||||
return data.GetRange((page - 1) * nb, nb);
|
||||
}
|
||||
|
||||
public async Task<int> getNbQuiz()
|
||||
{
|
||||
var data = await getQuizzes();
|
||||
return data.Count;
|
||||
}
|
||||
}
|
@ -1,69 +1,151 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WF_WebAdmin.Model;
|
||||
using static System.Net.WebRequestMethods;
|
||||
|
||||
namespace WF_WebAdmin.Service
|
||||
{
|
||||
public class QuoteServiceStub : IQuoteService
|
||||
{
|
||||
[Inject]
|
||||
public HttpClient Http { get; set; }
|
||||
|
||||
[Inject]
|
||||
public NavigationManager NavigationManager { get; set; }
|
||||
using System.Text.Json;
|
||||
using WF_WebAdmin.Model;
|
||||
|
||||
namespace WF_WebAdmin.Service;
|
||||
|
||||
public class QuoteServiceStub : IQuoteService
|
||||
{
|
||||
private readonly string _jsonFilePath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "fake-dataQuote.json");
|
||||
private readonly string _char = Path.Combine(Environment.CurrentDirectory, "wwwroot", "fake-dataCaracter.json");
|
||||
private readonly string _src = Path.Combine(Environment.CurrentDirectory, "wwwroot", "fake-dataSource.json");
|
||||
|
||||
public async Task saveQuoteJson(List<Quote> quotes)
|
||||
{
|
||||
var json = JsonSerializer.Serialize(quotes, new JsonSerializerOptions { WriteIndented = true });
|
||||
await File.WriteAllTextAsync(_jsonFilePath, json);
|
||||
}
|
||||
|
||||
public async Task addQuote(Quote quote)
|
||||
{
|
||||
var data = await getAllQuote();
|
||||
quote.Id = data.Count > 0 ? data.Max(p => p.Id) + 1 : 1;
|
||||
data.Add(quote);
|
||||
await saveQuoteJson(data);
|
||||
}
|
||||
|
||||
public Task addQuote(Quote quote)
|
||||
public async Task removeQuote(Quote quote)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var data = await getAllQuote();
|
||||
var q = data.FirstOrDefault(p => p.Id == quote.Id);
|
||||
if (q != null)
|
||||
{
|
||||
data.Remove(q);
|
||||
await saveQuoteJson(data);
|
||||
}
|
||||
}
|
||||
|
||||
public Task<List<Quote>> getAllQuote()
|
||||
public async Task validQuote(Quote quote)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<List<Quote>> getAllQuoteInvalid()
|
||||
public async Task updateQuote(Quote quote)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var data = await getAllQuote();
|
||||
var q = data.FirstOrDefault(p => p.Id == quote.Id);
|
||||
if (q != null)
|
||||
{
|
||||
q.Content = quote.Content;
|
||||
q.Charac = quote.Charac;
|
||||
q.ImgPath = quote.ImgPath;
|
||||
q.TitleSrc = quote.TitleSrc;
|
||||
q.DateSrc = quote.DateSrc;
|
||||
q.Langue = quote.Langue;
|
||||
await saveQuoteJson(data);
|
||||
}
|
||||
}
|
||||
|
||||
public Task<List<Quote>> getOnequote(int id)
|
||||
public async Task<List<Quote>> getAllQuote()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if (!File.Exists(_jsonFilePath))
|
||||
{
|
||||
Console.Out.WriteLine($"{_jsonFilePath} not found");
|
||||
return new List<Quote>();
|
||||
}
|
||||
|
||||
var json = await File.ReadAllTextAsync(_jsonFilePath);
|
||||
return JsonSerializer.Deserialize<List<Quote>>(json) ?? new List<Quote>();
|
||||
}
|
||||
|
||||
public Task<List<Quote>> getSomeQuote(int nb, int page)
|
||||
public async Task<List<Quote>> getSomeQuote(int nb, int page)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var quotes = await getAllQuote();
|
||||
if((page - 1) * nb + nb > quotes.Count())
|
||||
{
|
||||
if (nb > quotes.Count())
|
||||
{
|
||||
return quotes.GetRange(0, quotes.Count());
|
||||
}
|
||||
return quotes.GetRange(quotes.Count()-nb, nb);
|
||||
}
|
||||
return quotes.GetRange((page - 1) * nb, nb);
|
||||
}
|
||||
|
||||
public Task<List<Quote>> getSomeQuoteInvalid(int nb, int page)
|
||||
public async Task<Quote> getOnequote(int id)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var data = await getAllQuote();
|
||||
var q = data.FirstOrDefault(p => p.Id == id);
|
||||
if (q != null)
|
||||
{
|
||||
return q;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Task removeQuote(Quote quote)
|
||||
public async Task<List<Quote>> reserchQuote(string reserch, List<string> argument)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<List<Quote>> reserchQuote(string reserch, List<string> argument)
|
||||
public async Task<List<Quote>> getAllQuoteInvalid()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var quotes = await getAllQuote();
|
||||
quotes = quotes.Where(q => q.IsValid == false).ToList();
|
||||
return quotes;
|
||||
}
|
||||
|
||||
public Task updateQuote(Quote quote)
|
||||
public async Task<List<Quote>> getSomeQuoteInvalid(int nb, int page)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var quotes = await getAllQuoteInvalid();
|
||||
if ((page - 1) * nb + nb > quotes.Count())
|
||||
{
|
||||
if (nb > quotes.Count())
|
||||
{
|
||||
return quotes.GetRange(0, quotes.Count());
|
||||
}
|
||||
return quotes.GetRange(quotes.Count() - nb, nb);
|
||||
}
|
||||
return quotes.GetRange((page - 1) * nb, nb);
|
||||
}
|
||||
|
||||
public Task validQuote(Quote quote)
|
||||
public async Task<int> getNbQuote()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var data = await getAllQuote();
|
||||
return data.Count;
|
||||
}
|
||||
|
||||
public async Task<List<Character>> getChar()
|
||||
{
|
||||
if (!File.Exists(_char))
|
||||
{
|
||||
Console.Out.WriteLine($"{_char} not found");
|
||||
return new List<Character>();
|
||||
}
|
||||
|
||||
var json = await File.ReadAllTextAsync(_char);
|
||||
return JsonSerializer.Deserialize<List<Character>>(json) ?? new List<Character>();
|
||||
}
|
||||
|
||||
public async Task<List<Source>> getSrc()
|
||||
{
|
||||
if (!File.Exists(_src))
|
||||
{
|
||||
Console.Out.WriteLine($"{_src} not found");
|
||||
return new List<Source>();
|
||||
}
|
||||
|
||||
var json = await File.ReadAllTextAsync(_src);
|
||||
return JsonSerializer.Deserialize<List<Source>>(json) ?? new List<Source>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,97 @@
|
||||
using System.Text.Json;
|
||||
using WF_WebAdmin.Model;
|
||||
|
||||
namespace WF_WebAdmin.Service;
|
||||
|
||||
public class UserServiceStub : IUserService
|
||||
{
|
||||
private readonly string _jsonFilePath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "fake_data_users.json");
|
||||
|
||||
|
||||
public async Task saveUsersJson(List<User> users)
|
||||
{
|
||||
var json = JsonSerializer.Serialize(users, new JsonSerializerOptions { WriteIndented = true });
|
||||
await File.WriteAllTextAsync(_jsonFilePath, json);
|
||||
}
|
||||
|
||||
public async Task removeUser(User user)
|
||||
{
|
||||
var data = await getAllUser();
|
||||
var u = data.FirstOrDefault(p => p.Id == user.Id);
|
||||
if (u != null)
|
||||
{
|
||||
data.Remove(u);
|
||||
await saveUsersJson(data);
|
||||
}
|
||||
}
|
||||
|
||||
public Task updateRole(User user)
|
||||
{
|
||||
user.IsAdmin = true;
|
||||
return updateUser(user);
|
||||
}
|
||||
|
||||
public Task downgradeRole(User user)
|
||||
{
|
||||
user.IsAdmin = false;
|
||||
return updateUser(user);
|
||||
}
|
||||
|
||||
public async Task<List<User>> getAllUser()
|
||||
{
|
||||
if (!File.Exists(_jsonFilePath))
|
||||
{
|
||||
Console.Out.WriteLine($"{_jsonFilePath} not found");
|
||||
return new List<User>();
|
||||
}
|
||||
|
||||
var json = await File.ReadAllTextAsync(_jsonFilePath);
|
||||
return JsonSerializer.Deserialize<List<User>>(json) ?? new List<User>();
|
||||
}
|
||||
|
||||
public async Task<List<User>> getSomeUser(int nb, int page)
|
||||
{
|
||||
var users = await getAllUser();
|
||||
if ((page - 1) * nb + nb > users.Count())
|
||||
{
|
||||
return users.GetRange(users.Count() - nb, nb);
|
||||
}
|
||||
return users.GetRange((page - 1) * nb, nb);
|
||||
}
|
||||
|
||||
public async Task<User> getOneUser(int id)
|
||||
{
|
||||
var data = await getAllUser();
|
||||
var u = data.FirstOrDefault(p => p.Id == id);
|
||||
if (u != null)
|
||||
{
|
||||
return u;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Task<List<User>> reserchUsers(string reserch, List<string> args)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<int> getNbUser()
|
||||
{
|
||||
var data = await getAllUser();
|
||||
return data.Count;
|
||||
}
|
||||
|
||||
public async Task updateUser(User user)
|
||||
{
|
||||
var data = await getAllUser();
|
||||
var person = data.FirstOrDefault(p => p.Id == user.Id);
|
||||
if (person != null)
|
||||
{
|
||||
person.Name = user.Name;
|
||||
person.Email = user.Email;
|
||||
person.Image = user.Image;
|
||||
person.IsAdmin = user.IsAdmin;
|
||||
await saveUsersJson(data);
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 9.9 KiB |
@ -1,282 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"question": "Voluptate nulla laborum pariatur excepteur consequat officia ea esse ut nisi amet non.",
|
||||
"answerA": "sit ullamco",
|
||||
"answerB": "deserunt reprehenderit",
|
||||
"answerC": "cupidatat deserunt",
|
||||
"answerD": "ullamco aliqua",
|
||||
"cAnswer": "B",
|
||||
"userProposition": "Lori Myers"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"question": "Ea elit esse minim aute aliquip cillum amet cupidatat fugiat exercitation.",
|
||||
"answerA": "ullamco excepteur",
|
||||
"answerB": "aliquip occaecat",
|
||||
"answerC": "incididunt duis",
|
||||
"answerD": "sunt dolor",
|
||||
"cAnswer": "A",
|
||||
"userProposition": "Louella Robinson"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"question": "Aute commodo est proident sunt nulla est cillum eiusmod est voluptate dolore sit aliqua incididunt.",
|
||||
"answerA": "reprehenderit mollit",
|
||||
"answerB": "laboris consectetur",
|
||||
"answerC": "cillum deserunt",
|
||||
"answerD": "deserunt fugiat",
|
||||
"cAnswer": "B",
|
||||
"userProposition": "Richmond Joyner"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"question": "Fugiat duis excepteur non amet tempor deserunt ut occaecat cupidatat eiusmod et amet enim.",
|
||||
"answerA": "amet aute",
|
||||
"answerB": "excepteur ad",
|
||||
"answerC": "laboris veniam",
|
||||
"answerD": "veniam in",
|
||||
"cAnswer": "B",
|
||||
"userProposition": "Brady Patrick"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"question": "Occaecat minim velit dolor est ad ut irure eu labore velit in dolore exercitation.",
|
||||
"answerA": "eu aliqua",
|
||||
"answerB": "labore ipsum",
|
||||
"answerC": "labore reprehenderit",
|
||||
"answerD": "anim excepteur",
|
||||
"cAnswer": "C",
|
||||
"userProposition": "Mavis Boone"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"question": "Non laboris adipisicing anim fugiat labore excepteur tempor elit in.",
|
||||
"answerA": "in excepteur",
|
||||
"answerB": "nostrud dolor",
|
||||
"answerC": "nisi aliqua",
|
||||
"answerD": "sint nisi",
|
||||
"cAnswer": "C",
|
||||
"userProposition": "Douglas Dejesus"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"question": "Lorem proident exercitation elit fugiat do amet aute labore consectetur pariatur consequat.",
|
||||
"answerA": "eiusmod nulla",
|
||||
"answerB": "eu id",
|
||||
"answerC": "proident tempor",
|
||||
"answerD": "amet proident",
|
||||
"cAnswer": "A",
|
||||
"userProposition": "Mia Peterson"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"question": "Incididunt magna commodo laborum do incididunt commodo proident non cillum magna elit irure voluptate.",
|
||||
"answerA": "laborum fugiat",
|
||||
"answerB": "laboris est",
|
||||
"answerC": "in ea",
|
||||
"answerD": "duis ullamco",
|
||||
"cAnswer": "A",
|
||||
"userProposition": "Juliet Fox"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"question": "Qui labore fugiat sint Lorem ut minim in ex dolor.",
|
||||
"answerA": "et deserunt",
|
||||
"answerB": "labore sit",
|
||||
"answerC": "in eiusmod",
|
||||
"answerD": "amet incididunt",
|
||||
"cAnswer": "C",
|
||||
"userProposition": "Earnestine Poole"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"question": "Voluptate pariatur ipsum magna sint Lorem adipisicing.",
|
||||
"answerA": "sint velit",
|
||||
"answerB": "non culpa",
|
||||
"answerC": "nisi ut",
|
||||
"answerD": "excepteur labore",
|
||||
"cAnswer": "B",
|
||||
"userProposition": "Alexis Cross"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"question": "In labore sunt est cupidatat cillum.",
|
||||
"answerA": "ut ad",
|
||||
"answerB": "non deserunt",
|
||||
"answerC": "do officia",
|
||||
"answerD": "ut nostrud",
|
||||
"cAnswer": "C",
|
||||
"userProposition": "Brooks Martinez"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"question": "Irure occaecat sit laborum nulla ea dolore et aliqua sunt Lorem enim esse.",
|
||||
"answerA": "excepteur occaecat",
|
||||
"answerB": "pariatur in",
|
||||
"answerC": "reprehenderit excepteur",
|
||||
"answerD": "laborum adipisicing",
|
||||
"cAnswer": "D",
|
||||
"userProposition": "Shields Roth"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"question": "Laboris sint in sit exercitation nisi id cillum ex ea culpa fugiat in cupidatat.",
|
||||
"answerA": "labore mollit",
|
||||
"answerB": "in veniam",
|
||||
"answerC": "labore eiusmod",
|
||||
"answerD": "consequat veniam",
|
||||
"cAnswer": "B",
|
||||
"userProposition": "Carmella Chase"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"question": "Proident dolor Lorem anim proident laborum sint minim sit laborum aliquip.",
|
||||
"answerA": "velit exercitation",
|
||||
"answerB": "voluptate esse",
|
||||
"answerC": "occaecat cupidatat",
|
||||
"answerD": "enim adipisicing",
|
||||
"cAnswer": "D",
|
||||
"userProposition": "Johns Solomon"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"question": "Do magna dolore enim laborum consequat reprehenderit nisi consequat nostrud.",
|
||||
"answerA": "proident do",
|
||||
"answerB": "labore minim",
|
||||
"answerC": "in elit",
|
||||
"answerD": "in irure",
|
||||
"cAnswer": "A",
|
||||
"userProposition": "Alana Moore"
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"question": "Culpa anim id elit dolore veniam.",
|
||||
"answerA": "ipsum nisi",
|
||||
"answerB": "officia voluptate",
|
||||
"answerC": "in excepteur",
|
||||
"answerD": "ullamco non",
|
||||
"cAnswer": "B",
|
||||
"userProposition": "Russo Rios"
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"question": "Ea est consectetur exercitation aute ut mollit pariatur irure aute adipisicing dolore.",
|
||||
"answerA": "fugiat elit",
|
||||
"answerB": "pariatur nulla",
|
||||
"answerC": "exercitation ipsum",
|
||||
"answerD": "exercitation laboris",
|
||||
"cAnswer": "A",
|
||||
"userProposition": "Bobbi Lara"
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"question": "Laborum consectetur incididunt ad fugiat fugiat proident culpa mollit laborum.",
|
||||
"answerA": "elit duis",
|
||||
"answerB": "amet aute",
|
||||
"answerC": "culpa nostrud",
|
||||
"answerD": "do pariatur",
|
||||
"cAnswer": "D",
|
||||
"userProposition": "Lewis Mullins"
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"question": "Culpa anim aliquip mollit non labore.",
|
||||
"answerA": "labore incididunt",
|
||||
"answerB": "laborum non",
|
||||
"answerC": "sunt laborum",
|
||||
"answerD": "est sunt",
|
||||
"cAnswer": "B",
|
||||
"userProposition": "Mccray Mccoy"
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"question": "Ex exercitation deserunt aute cillum dolor.",
|
||||
"answerA": "proident magna",
|
||||
"answerB": "pariatur exercitation",
|
||||
"answerC": "ipsum veniam",
|
||||
"answerD": "culpa quis",
|
||||
"cAnswer": "C",
|
||||
"userProposition": "Moss Jefferson"
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"question": "Do mollit aute dolore anim id non aliqua.",
|
||||
"answerA": "ipsum aute",
|
||||
"answerB": "irure ex",
|
||||
"answerC": "ex duis",
|
||||
"answerD": "ipsum cupidatat",
|
||||
"cAnswer": "B",
|
||||
"userProposition": "Roth Valdez"
|
||||
},
|
||||
{
|
||||
"id": 22,
|
||||
"question": "Commodo sunt reprehenderit tempor sit ut ea Lorem esse minim elit et sunt sint qui.",
|
||||
"answerA": "et do",
|
||||
"answerB": "officia culpa",
|
||||
"answerC": "et commodo",
|
||||
"answerD": "irure tempor",
|
||||
"cAnswer": "D",
|
||||
"userProposition": "Adrienne Carpenter"
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"question": "Excepteur cupidatat ut sit commodo magna elit.",
|
||||
"answerA": "pariatur tempor",
|
||||
"answerB": "proident non",
|
||||
"answerC": "velit elit",
|
||||
"answerD": "pariatur fugiat",
|
||||
"cAnswer": "D",
|
||||
"userProposition": "Mcknight Cain"
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"question": "Laborum eu nisi consequat voluptate in laboris cillum in aute sint excepteur aliqua Lorem in.",
|
||||
"answerA": "pariatur in",
|
||||
"answerB": "voluptate qui",
|
||||
"answerC": "et cillum",
|
||||
"answerD": "adipisicing id",
|
||||
"cAnswer": "D",
|
||||
"userProposition": "Gay Barlow"
|
||||
},
|
||||
{
|
||||
"id": 25,
|
||||
"question": "Laborum ullamco occaecat excepteur deserunt nostrud dolor.",
|
||||
"answerA": "magna labore",
|
||||
"answerB": "ullamco veniam",
|
||||
"answerC": "reprehenderit irure",
|
||||
"answerD": "magna dolore",
|
||||
"cAnswer": "B",
|
||||
"userProposition": "Hannah Battle"
|
||||
},
|
||||
{
|
||||
"id": 26,
|
||||
"question": "Commodo in amet laboris Lorem et qui anim ea ullamco dolor dolor commodo.",
|
||||
"answerA": "amet nulla",
|
||||
"answerB": "laborum mollit",
|
||||
"answerC": "amet in",
|
||||
"answerD": "irure amet",
|
||||
"cAnswer": "D",
|
||||
"userProposition": "Dawson Mcpherson"
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"question": "Veniam non consectetur sit cillum.",
|
||||
"answerA": "aliqua cupidatat",
|
||||
"answerB": "nostrud culpa",
|
||||
"answerC": "anim ullamco",
|
||||
"answerD": "adipisicing et",
|
||||
"cAnswer": "A",
|
||||
"userProposition": "Reeves Love"
|
||||
},
|
||||
{
|
||||
"id": 28,
|
||||
"question": "Ullamco laboris voluptate nostrud commodo Lorem enim ad ipsum.",
|
||||
"answerA": "id aute",
|
||||
"answerB": "aliquip incididunt",
|
||||
"answerC": "duis elit",
|
||||
"answerD": "mollit ad",
|
||||
"cAnswer": "B",
|
||||
"userProposition": "Michael Holmes"
|
||||
}
|
||||
]
|
@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"Id": 4,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.3vXkEUJ9J8s-GsnBC6I3KAHaF0?w=185\u0026h=180\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "jesus",
|
||||
"Email": "jesus@allah.coran",
|
||||
"DateCreation": "2024-10-10T00:00:00"
|
||||
}
|
||||
]
|
@ -1,166 +0,0 @@
|
||||
[
|
||||
{
|
||||
"Id": 1,
|
||||
"Image": "https://tse4.mm.bing.net/th/id/OIP.fc5TQflh0cbxB1GUeOdk6gHaK8?w=123&h=180&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "admin",
|
||||
"Email": "admin@gmail.com",
|
||||
"DateCreation": "2024-12-12",
|
||||
"IsAdmin": true,
|
||||
"Comments": [
|
||||
{
|
||||
"Text": "Commentaire 1",
|
||||
"DateCreation": "2024-12-12"
|
||||
},
|
||||
{
|
||||
"Text": "Commentaire 2",
|
||||
"DateCreation": "2024-11-12"
|
||||
}
|
||||
],
|
||||
"Mdp": "admin"
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "exploit",
|
||||
"Email": "exploit@gmail.com",
|
||||
"DateCreation": "2024-11-12",
|
||||
"IsAdmin": true,
|
||||
"Mdp": "exploit"
|
||||
},
|
||||
{
|
||||
"Id": 3,
|
||||
"Image": "https://tse4.mm.bing.net/th/id/OIP.XNQPKwc1OUfvnSO9MsxDYgHaE7?w=202&h=180&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "testeur",
|
||||
"Email": "testeur@gmail.com",
|
||||
"DateCreation": "2024-08-02",
|
||||
"IsAdmin": false,
|
||||
"Comments": [
|
||||
{
|
||||
"Text": "Premier test effectué, tout semble OK.",
|
||||
"DateCreation": "2024-08-02"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "dev",
|
||||
"Email": "dev@gmail.com",
|
||||
"DateCreation": "2024-10-10",
|
||||
"IsAdmin": false
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "jean_doe",
|
||||
"Email": "jean.doe@gmail.com",
|
||||
"DateCreation": "2024-06-25",
|
||||
"IsAdmin": false,
|
||||
"Comments": [
|
||||
{
|
||||
"Text": "Utilisateur très actif, peut être un peu trop intrusif.",
|
||||
"DateCreation": "2024-06-25"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "jane_smith",
|
||||
"Email": "jane.smith@gmail.com",
|
||||
"DateCreation": "2024-07-15",
|
||||
"IsAdmin": false
|
||||
},
|
||||
{
|
||||
"Id": 7,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "admin_joe",
|
||||
"Email": "admin.joe@gmail.com",
|
||||
"DateCreation": "2024-05-30",
|
||||
"IsAdmin": true
|
||||
},
|
||||
{
|
||||
"Id": 8,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "dev_anna",
|
||||
"Email": "dev.anna@gmail.com",
|
||||
"DateCreation": "2024-09-05",
|
||||
"IsAdmin": false
|
||||
},
|
||||
{
|
||||
"Id": 9,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "support_mark",
|
||||
"Email": "support.mark@gmail.com",
|
||||
"DateCreation": "2024-11-20",
|
||||
"IsAdmin": false,
|
||||
"Comments": [
|
||||
{
|
||||
"Text": "Support rapide et efficace, mais manquant un peu de détails.",
|
||||
"DateCreation": "2024-11-20"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 10,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "dev_susan",
|
||||
"Email": "dev.susan@gmail.com",
|
||||
"DateCreation": "2024-08-12",
|
||||
"IsAdmin": false
|
||||
},
|
||||
{
|
||||
"Id": 11,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "designer_steve",
|
||||
"Email": "designer.steve@gmail.com",
|
||||
"DateCreation": "2024-07-01",
|
||||
"IsAdmin": false,
|
||||
"Comments": [
|
||||
{
|
||||
"Text": "Le design doit être retravaillé pour plus de clarté.",
|
||||
"DateCreation": "2024-07-01"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 12,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "admin_lucas",
|
||||
"Email": "admin.lucas@gmail.com",
|
||||
"DateCreation": "2024-09-22",
|
||||
"IsAdmin": true
|
||||
},
|
||||
{
|
||||
"Id": 13,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "manager_anna",
|
||||
"Email": "manager.anna@gmail.com",
|
||||
"DateCreation": "2024-05-01",
|
||||
"IsAdmin": false
|
||||
},
|
||||
{
|
||||
"Id": 14,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "developer_mike",
|
||||
"Email": "developer.mike@gmail.com",
|
||||
"DateCreation": "2024-11-02",
|
||||
"IsAdmin": false
|
||||
},
|
||||
{
|
||||
"Id": 15,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "test_user_01",
|
||||
"Email": "test.user01@gmail.com",
|
||||
"DateCreation": "2024-06-10",
|
||||
"IsAdmin": false
|
||||
},
|
||||
{
|
||||
"Id": 16,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
|
||||
"Name": "admin_kate",
|
||||
"Email": "admin.kate@gmail.com",
|
||||
"DateCreation": "2024-04-16",
|
||||
"IsAdmin": true
|
||||
}
|
||||
]
|
@ -0,0 +1,79 @@
|
||||
[
|
||||
{
|
||||
"Id": 9,
|
||||
"Question": "Question_quiz_1",
|
||||
"AnswerA": "rep_1",
|
||||
"AnswerB": "rep_2",
|
||||
"AnswerC": "rep_3",
|
||||
"AnswerD": "rep_3",
|
||||
"CAnswer": "A",
|
||||
"IsValid": false,
|
||||
"UserProposition": "Earnestine Poole"
|
||||
},
|
||||
{
|
||||
"Id": 10,
|
||||
"Question": "Voluptate pariatur ipsum magna sint Lorem adipisicing.",
|
||||
"AnswerA": "sint velit",
|
||||
"AnswerB": "non culpa",
|
||||
"AnswerC": "nisi ut",
|
||||
"AnswerD": "excepteur labore",
|
||||
"CAnswer": "B",
|
||||
"IsValid": false,
|
||||
"UserProposition": "Alexis Cross"
|
||||
},
|
||||
{
|
||||
"Id": 11,
|
||||
"Question": "nv question",
|
||||
"AnswerA": "repA",
|
||||
"AnswerB": "non deserunt",
|
||||
"AnswerC": "do officia",
|
||||
"AnswerD": "ut nostrud",
|
||||
"CAnswer": "C",
|
||||
"IsValid": false,
|
||||
"UserProposition": "Brooks Martinez"
|
||||
},
|
||||
{
|
||||
"Id": 12,
|
||||
"Question": "Irure occaecat sit laborum nulla ea dolore et aliqua sunt Lorem enim esse.",
|
||||
"AnswerA": "excepteur occaecat",
|
||||
"AnswerB": "pariatur in",
|
||||
"AnswerC": "reprehenderit excepteur",
|
||||
"AnswerD": "laborum adipisicing",
|
||||
"CAnswer": "D",
|
||||
"IsValid": false,
|
||||
"UserProposition": "Shields Roth"
|
||||
},
|
||||
{
|
||||
"Id": 13,
|
||||
"Question": "test",
|
||||
"AnswerA": "a",
|
||||
"AnswerB": "b",
|
||||
"AnswerC": "c",
|
||||
"AnswerD": "d",
|
||||
"CAnswer": "D",
|
||||
"IsValid": true,
|
||||
"UserProposition": "Admin"
|
||||
},
|
||||
{
|
||||
"Id": 14,
|
||||
"Question": "bonjour",
|
||||
"AnswerA": "ca",
|
||||
"AnswerB": "va",
|
||||
"AnswerC": "marcher",
|
||||
"AnswerD": "!",
|
||||
"CAnswer": "A",
|
||||
"IsValid": true,
|
||||
"UserProposition": "Admin"
|
||||
},
|
||||
{
|
||||
"Id": 15,
|
||||
"Question": "test",
|
||||
"AnswerA": "a",
|
||||
"AnswerB": "b",
|
||||
"AnswerC": "c",
|
||||
"AnswerD": "d",
|
||||
"CAnswer": "C",
|
||||
"IsValid": true,
|
||||
"UserProposition": "Admin"
|
||||
}
|
||||
]
|
@ -0,0 +1,107 @@
|
||||
[
|
||||
{
|
||||
"Id": 3,
|
||||
"Image": "https://tse4.mm.bing.net/th/id/OIP.XNQPKwc1OUfvnSO9MsxDYgHaE7?w=202\u0026h=180\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "testeur",
|
||||
"Email": "testeur@gmail.com",
|
||||
"DateCreation": "2024-08-02T00:00:00",
|
||||
"IsAdmin": true,
|
||||
"Comments": [
|
||||
{
|
||||
"Text": "Premier test effectu\u00E9, tout semble OK.",
|
||||
"DateCreation": "2024-08-02T00:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 4,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137\u0026h=195\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "dev",
|
||||
"Email": "dev@gmail.com",
|
||||
"DateCreation": "2024-10-10T00:00:00",
|
||||
"IsAdmin": false,
|
||||
"Comments": null
|
||||
},
|
||||
{
|
||||
"Id": 5,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137\u0026h=195\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "jean_doe",
|
||||
"Email": "jean.doe@gmail.com",
|
||||
"DateCreation": "2024-06-25T00:00:00",
|
||||
"IsAdmin": false,
|
||||
"Comments": [
|
||||
{
|
||||
"Text": "Utilisateur tr\u00E8s actif, peut \u00EAtre un peu trop intrusif.",
|
||||
"DateCreation": "2024-06-25T00:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 6,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137\u0026h=195\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "jane_smith",
|
||||
"Email": "jane.smith@gmail.com",
|
||||
"DateCreation": "2024-07-15T00:00:00",
|
||||
"IsAdmin": false,
|
||||
"Comments": null
|
||||
},
|
||||
{
|
||||
"Id": 7,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137\u0026h=195\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "test_n1",
|
||||
"Email": "admin.joe@gmail.com",
|
||||
"DateCreation": "2024-05-30T00:00:00",
|
||||
"IsAdmin": false,
|
||||
"Comments": null
|
||||
},
|
||||
{
|
||||
"Id": 8,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137\u0026h=195\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "dev_anna",
|
||||
"Email": "dev.anna@gmail.com",
|
||||
"DateCreation": "2024-09-05T00:00:00",
|
||||
"IsAdmin": false,
|
||||
"Comments": null
|
||||
},
|
||||
{
|
||||
"Id": 9,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137\u0026h=195\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "support_mark",
|
||||
"Email": "support.mark@gmail.com",
|
||||
"DateCreation": "2024-11-20T00:00:00",
|
||||
"IsAdmin": false,
|
||||
"Comments": [
|
||||
{
|
||||
"Text": "Support rapide et efficace, mais manquant un peu de d\u00E9tails.",
|
||||
"DateCreation": "2024-11-20T00:00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Id": 10,
|
||||
"Image": "https://th.bing.com/th/id/OIP.24T00MDK-RUhFnm1Do5PFwHaFj?w=229\u0026h=180\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "dev_susan",
|
||||
"Email": "dev.susan@gmail.com",
|
||||
"DateCreation": "2024-08-12T00:00:00",
|
||||
"IsAdmin": false,
|
||||
"Comments": null
|
||||
},
|
||||
{
|
||||
"Id": 12,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137\u0026h=195\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "admin_lucas",
|
||||
"Email": "admin.lucas@gmail.com",
|
||||
"DateCreation": "2024-09-22T00:00:00",
|
||||
"IsAdmin": false,
|
||||
"Comments": null
|
||||
},
|
||||
{
|
||||
"Id": 14,
|
||||
"Image": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137\u0026h=195\u0026c=7\u0026r=0\u0026o=5\u0026pid=1.7",
|
||||
"Name": "developer_mike",
|
||||
"Email": "developer.mike@gmail.com",
|
||||
"DateCreation": "2024-11-02T00:00:00",
|
||||
"IsAdmin": false,
|
||||
"Comments": null
|
||||
}
|
||||
]
|
Loading…
Reference in new issue