590 lines
27 KiB
C#
590 lines
27 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using Manager.DTOs;
|
|
using Manager.Services;
|
|
using ManagerService.Data;
|
|
using ManagerService.Data.SubSection;
|
|
using ManagerService.DTOs;
|
|
using ManagerService.Helpers;
|
|
using ManagerService.Services;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.Logging;
|
|
using Newtonsoft.Json;
|
|
using NSwag.Annotations;
|
|
|
|
namespace ManagerService.Controllers
|
|
{
|
|
[Authorize] // TODO Add ROLES (Roles = "Admin")
|
|
[ApiController, Route("api/[controller]")]
|
|
[OpenApiTag("Resource", Description = "Resource management")]
|
|
public class ResourceController : ControllerBase
|
|
{
|
|
private readonly MyInfoMateDbContext _myInfoMateDbContext;
|
|
|
|
private ResourceDatabaseService _resourceService;
|
|
private SectionDatabaseService _sectionService;
|
|
private ConfigurationDatabaseService _configurationService;
|
|
private readonly ILogger<ResourceController> _logger;
|
|
IHexIdGeneratorService idService = new HexIdGeneratorService();
|
|
|
|
private static int MaxWidth = 1024;
|
|
private static int MaxHeight = 1024;
|
|
|
|
public ResourceController(ILogger<ResourceController> logger, ResourceDatabaseService resourceService, SectionDatabaseService sectionService, ConfigurationDatabaseService configurationService, MyInfoMateDbContext myInfoMateDbContext)
|
|
{
|
|
_logger = logger;
|
|
_resourceService = resourceService;
|
|
_sectionService = sectionService;
|
|
_configurationService = configurationService;
|
|
_myInfoMateDbContext = myInfoMateDbContext;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Get a list of all resources (summary)
|
|
/// </summary>
|
|
/// <param name="id">id instance</param>
|
|
/// <param name="types">types of resource</param>
|
|
[ProducesResponseType(typeof(List<ResourceDTO>), 200)]
|
|
[ProducesResponseType(typeof(string), 500)]
|
|
[HttpGet]
|
|
public ObjectResult Get([FromQuery] string instanceId, [FromQuery] List<ResourceType> types)
|
|
{
|
|
try
|
|
{
|
|
if (instanceId == null)
|
|
throw new ArgumentNullException("InstanceId needed");
|
|
List<Resource> resources = new List<Resource>();
|
|
|
|
if (types.Count > 0)
|
|
{
|
|
resources = _myInfoMateDbContext.Resources.Where(r => r.InstanceId == instanceId && types.Contains(r.Type)).ToList();
|
|
//resources = _resourceService.GetAllByType(instanceId, types);
|
|
}
|
|
else
|
|
{
|
|
resources = _myInfoMateDbContext.Resources.Where(r => r.InstanceId == instanceId).ToList();
|
|
//resources = _resourceService.GetAll(instanceId);
|
|
}
|
|
|
|
List<ResourceDTO> resourceDTOs = new List<ResourceDTO>();
|
|
foreach(var resource in resources)
|
|
{
|
|
ResourceDTO resourceDTO = new ResourceDTO();
|
|
resourceDTO = resource.ToDTO();
|
|
resourceDTOs.Add(resourceDTO);
|
|
}
|
|
|
|
return new OkObjectResult(resourceDTOs.OrderByDescending(r => r.dateCreation));
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return new ObjectResult(ex.Message) { StatusCode = 500 };
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Get a specific resource
|
|
/// </summary>
|
|
/// <param name="id">id resource</param>
|
|
[AllowAnonymous]
|
|
[ProducesResponseType(typeof(ResourceDTO), 200)]
|
|
[ProducesResponseType(typeof(string), 404)]
|
|
[ProducesResponseType(typeof(string), 500)]
|
|
[HttpGet("{id}/detail")]
|
|
public ObjectResult GetDetail(string id)
|
|
{
|
|
try
|
|
{
|
|
Resource resource = _myInfoMateDbContext.Resources.FirstOrDefault(r => r.Id == id);
|
|
//Resource resource = _resourceService.GetById(id);
|
|
|
|
if (resource == null)
|
|
throw new KeyNotFoundException("This resource was not found");
|
|
|
|
ResourceDTO resourceDTO = new ResourceDTO();
|
|
resourceDTO = resource.ToDTO();
|
|
/*if (resource.Type == ResourceType.ImageUrl)
|
|
{
|
|
var resourceData = _resourceDataService.GetByResourceId(resource.Id);
|
|
resourceDTO.data = resourceData != null ? resourceData.Data : null;
|
|
}*/
|
|
|
|
// RESIZE IMAGE
|
|
|
|
/*byte[] imageBytes = Convert.FromBase64String(resourceData.Data);
|
|
|
|
using (MemoryStream originalImageMemoryStream = new MemoryStream(imageBytes))
|
|
{
|
|
using (Image image = Image.FromStream(originalImageMemoryStream))
|
|
{
|
|
var width = image.Width;
|
|
var height = image.Height;
|
|
|
|
if (image.Width > MaxWidth || image.Height > MaxHeight)
|
|
{
|
|
Size newSize = ImageResizer.ResizeKeepAspect(image.Size, MaxWidth, MaxHeight);
|
|
byte[] resizedImage = ImageResizer.ResizeImage(image, newSize.Width, newSize.Height, image.Width, image.Height);
|
|
|
|
resourceData.Data = Convert.ToBase64String(resizedImage);
|
|
ResourceData resourceModified = _resourceDataService.Update(resourceData.Id, resourceData);
|
|
}
|
|
}
|
|
}*/
|
|
|
|
return new OkObjectResult(resourceDTO);
|
|
}
|
|
catch (KeyNotFoundException ex)
|
|
{
|
|
return new NotFoundObjectResult(ex.Message) {};
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return new ObjectResult(ex.Message) { StatusCode = 500 };
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Show a specific resource (as a picture or video stream)
|
|
/// </summary>
|
|
/// <param name="id">id resource</param>
|
|
[AllowAnonymous]
|
|
[ProducesResponseType(typeof(FileResult), 200)]
|
|
[ProducesResponseType(typeof(string), 404)]
|
|
[ProducesResponseType(typeof(string), 500)]
|
|
[HttpGet("{id}")]
|
|
public ActionResult Show(string id)
|
|
{
|
|
try
|
|
{
|
|
Resource resource = _myInfoMateDbContext.Resources.FirstOrDefault(r => r.Id == id);
|
|
//OldResource resource = _resourceService.GetById(id);
|
|
if (resource == null)
|
|
throw new KeyNotFoundException("This resource was not found");
|
|
|
|
//var file = Convert.FromBase64String(resourceData.Data);
|
|
|
|
// RESIZE IMAGE
|
|
|
|
/*using (MemoryStream originalImageMemoryStream = new MemoryStream(file))
|
|
{
|
|
using (Image image = Image.FromStream(originalImageMemoryStream))
|
|
{
|
|
var width = image.Width;
|
|
var height = image.Height;
|
|
|
|
if(image.Width > MaxWidth || image.Height > MaxHeight)
|
|
{
|
|
Size newSize = ImageResizer.ResizeKeepAspect(image.Size, MaxWidth, MaxHeight);
|
|
byte[] resizedImage = ImageResizer.ResizeImage(image, newSize.Width, newSize.Height, image.Width, image.Height);
|
|
|
|
resourceData.Data = Convert.ToBase64String(resizedImage);
|
|
ResourceData resourceModified = _resourceDataService.Update(resourceData.Id, resourceData);
|
|
}
|
|
}
|
|
}*/
|
|
|
|
/*if (resource.Type == ResourceType.Image)
|
|
{
|
|
return new FileContentResult(file, "image/png")
|
|
{
|
|
FileDownloadName = resource.Label + ".png"
|
|
};
|
|
}
|
|
if (resource.Type == ResourceType.Video || resource.Type == ResourceType.Audio)
|
|
{
|
|
return new FileContentResult(file, "application/octet-stream")
|
|
{
|
|
FileDownloadName = resource.Type == ResourceType.Audio ? resource.Label + ".mp3" : resource.Label + ".mp4",
|
|
};
|
|
}
|
|
|
|
return new FileContentResult(file, "image/png");*/
|
|
return new NotFoundObjectResult("No more supported") { };
|
|
}
|
|
catch (KeyNotFoundException ex)
|
|
{
|
|
return new NotFoundObjectResult(ex.Message) { };
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return new ObjectResult(ex.Message) { StatusCode = 500 };
|
|
}
|
|
}
|
|
|
|
// OLD VERSION
|
|
/// <summary>
|
|
/// Upload a specific resource (picture or video)
|
|
/// </summary>
|
|
[ProducesResponseType(typeof(string), 200)]
|
|
[ProducesResponseType(typeof(string), 404)]
|
|
[ProducesResponseType(typeof(string), 500)]
|
|
[HttpPost("upload"), DisableRequestSizeLimit]
|
|
public IActionResult Upload([FromForm] string label, [FromForm] string type, [FromForm] string instanceId) // Create but with local //[FromBody] ResourceDetailDTO uploadResource
|
|
{
|
|
try
|
|
{
|
|
if (label == null || type == null || instanceId == null)
|
|
throw new ArgumentNullException("One of resource params is null");
|
|
|
|
var resourceType = (ResourceType)Enum.Parse(typeof(ResourceType), type);
|
|
List<Resource> resources = new List<Resource>();
|
|
|
|
foreach (var file in Request.Form.Files)
|
|
{
|
|
if (file.Length > 0)
|
|
{
|
|
var stringResult = "";
|
|
double fileSizeibMbs = (double) ((double)file.Length) / (1024*1024);
|
|
if (fileSizeibMbs <= 1.5 || resourceType == ResourceType.Image)
|
|
{
|
|
using (var ms = new MemoryStream())
|
|
{
|
|
file.CopyTo(ms);
|
|
var fileBytes = ms.ToArray();
|
|
if (resourceType == ResourceType.Image)
|
|
{
|
|
bool isFort = instanceId == "633ee379d9405f32f166f047"; // If fort saint heribert, TODO add watermark in configuration and model
|
|
|
|
if(isFort) // TODO We need to know for which purpose (mobile or tablet)
|
|
{
|
|
fileBytes = ImageHelper.ResizeAndAddWatermark(fileBytes, isFort, MaxWidth, MaxHeight);
|
|
}
|
|
}
|
|
stringResult = Convert.ToBase64String(fileBytes);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
throw new FileLoadException(message: "Fichier inexistant ou trop volumineux (max 4Mb)");
|
|
}
|
|
// Todo add some verification ?
|
|
Resource resource = new Resource();
|
|
resource.Label = label;
|
|
resource.Type = resourceType;
|
|
resource.DateCreation = DateTime.Now.ToUniversalTime();
|
|
resource.InstanceId = instanceId;
|
|
resource.Id = idService.GenerateHexId();
|
|
|
|
_myInfoMateDbContext.Add(resource);
|
|
_myInfoMateDbContext.SaveChanges();
|
|
|
|
//Resource resourceCreated = _resourceService.Create(resource);
|
|
resources.Add(resource);
|
|
}
|
|
}
|
|
return Ok(resources.Select(r => r.ToDTO()));
|
|
}
|
|
catch (ArgumentNullException ex)
|
|
{
|
|
return new BadRequestObjectResult(ex.Message) { };
|
|
}
|
|
catch (FileLoadException ex)
|
|
{
|
|
return new BadRequestObjectResult(ex.Message) { };
|
|
}
|
|
catch (InvalidOperationException ex)
|
|
{
|
|
return new ConflictObjectResult(ex.Message) { };
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return new ObjectResult(ex.Message) { StatusCode = 500 };
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Create a new resource
|
|
/// </summary>
|
|
/// <param name="newResource">New resource info</param>
|
|
[ProducesResponseType(typeof(ResourceDTO), 200)]
|
|
[ProducesResponseType(typeof(string), 400)]
|
|
[ProducesResponseType(typeof(string), 409)]
|
|
[ProducesResponseType(typeof(string), 500)]
|
|
[HttpPost]
|
|
public ObjectResult Create([FromBody] ResourceDTO newResource)
|
|
{
|
|
try
|
|
{
|
|
if (newResource == null)
|
|
throw new ArgumentNullException("Resource param is null");
|
|
|
|
// Todo add some verification ?
|
|
Resource resource = new Resource();
|
|
resource.InstanceId = newResource.instanceId;
|
|
resource.Label = newResource.label;
|
|
resource.Type = newResource.type;
|
|
resource.Url = newResource.url;
|
|
resource.DateCreation = DateTime.Now.ToUniversalTime();
|
|
//resource.Data = newResource.data;
|
|
resource.InstanceId = newResource.instanceId;
|
|
resource.Id = idService.GenerateHexId();
|
|
|
|
_myInfoMateDbContext.Add(resource);
|
|
_myInfoMateDbContext.SaveChanges();
|
|
//OldResource resourceCreated = _resourceService.Create(resource);
|
|
|
|
return new OkObjectResult(resource.ToDTO()); // WITHOUT DATA
|
|
}
|
|
catch (ArgumentNullException ex)
|
|
{
|
|
return new BadRequestObjectResult(ex.Message) {};
|
|
}
|
|
catch (InvalidOperationException ex)
|
|
{
|
|
return new ConflictObjectResult(ex.Message) {};
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return new ObjectResult(ex.Message) { StatusCode = 500 };
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Update a resource
|
|
/// </summary>
|
|
/// <param name="updatedResource">Resource to update</param>
|
|
[ProducesResponseType(typeof(ResourceDTO), 200)]
|
|
[ProducesResponseType(typeof(string), 400)]
|
|
[ProducesResponseType(typeof(string), 404)]
|
|
[ProducesResponseType(typeof(string), 500)]
|
|
[HttpPut]
|
|
public ObjectResult Update([FromBody] ResourceDTO updatedResource)
|
|
{
|
|
try
|
|
{
|
|
if (updatedResource == null)
|
|
throw new ArgumentNullException("Resource param is null");
|
|
|
|
//OldResource resource = _resourceService.GetById(updatedResource.id);
|
|
Resource resource = _myInfoMateDbContext.Resources.FirstOrDefault(r => r.Id == updatedResource.id);
|
|
|
|
if (resource == null)
|
|
throw new KeyNotFoundException("Resource does not exist");
|
|
|
|
// Todo add some verification ?
|
|
resource.InstanceId = updatedResource.instanceId != null ? updatedResource.instanceId : resource.InstanceId;
|
|
resource.Label = updatedResource.label != null ? updatedResource.label : resource.Label;
|
|
resource.Type = updatedResource.type != null ? updatedResource.type : resource.Type;
|
|
resource.Url = updatedResource.url != null ? updatedResource.url: resource.Url;
|
|
//resource.Data = updatedResource.data; // NOT ALLOWED
|
|
|
|
_myInfoMateDbContext.SaveChanges();
|
|
|
|
//OldResource resourceModified = _resourceService.Update(updatedResource.id, resource);
|
|
|
|
return new OkObjectResult(resource.ToDTO());
|
|
}
|
|
catch (ArgumentNullException ex)
|
|
{
|
|
return new BadRequestObjectResult(ex.Message) {};
|
|
}
|
|
catch (KeyNotFoundException ex)
|
|
{
|
|
return new NotFoundObjectResult(ex.Message) {};
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return new ObjectResult(ex.Message) { StatusCode = 500 };
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete a resource
|
|
/// </summary>
|
|
/// <param name="id">Id of resource to delete</param>
|
|
[ProducesResponseType(typeof(string), 202)]
|
|
[ProducesResponseType(typeof(string), 400)]
|
|
[ProducesResponseType(typeof(string), 404)]
|
|
[ProducesResponseType(typeof(string), 500)]
|
|
[HttpDelete("{id}")]
|
|
public ObjectResult Delete(string id)
|
|
{
|
|
try
|
|
{
|
|
if (id == null)
|
|
throw new ArgumentNullException("Resource param is null");
|
|
|
|
//var ressource = _resourceService.GetById(id);
|
|
Resource resource = _myInfoMateDbContext.Resources.FirstOrDefault(r => r.Id == id);
|
|
if (resource == null)
|
|
throw new KeyNotFoundException("Resource does not exist");
|
|
|
|
|
|
List<Configuration> configurations = _myInfoMateDbContext.Configurations.Where(c => c.InstanceId == resource.InstanceId).ToList();
|
|
foreach (var configuration in configurations)
|
|
{
|
|
if (configuration.ImageId == id)
|
|
{
|
|
configuration.ImageId = null;
|
|
configuration.ImageSource = null;
|
|
}
|
|
}
|
|
|
|
List<Section> sections = _myInfoMateDbContext.Sections.Where(s => s.InstanceId == resource.InstanceId).ToList();
|
|
// Delete all resource occurence
|
|
foreach (var section in sections)
|
|
{
|
|
if (section.ImageId == id)
|
|
{
|
|
section.ImageId = null;
|
|
section.ImageSource = null;
|
|
}
|
|
|
|
switch (section)
|
|
{
|
|
case SectionMap map:
|
|
//MapDTO mapDTO = JsonConvert.DeserializeObject<MapDTO>(section.Data);
|
|
map.MapResourceId = map.MapResourceId == id ? null : map.MapResourceId;
|
|
foreach (var point in map.MapPoints)
|
|
{
|
|
point.ImageResourceId = point.ImageResourceId == id ? null : point.ImageResourceId;
|
|
foreach (var content in point.Contents)
|
|
{
|
|
content.Url = content.Id == id ? null : content.Url;
|
|
content.Id = content.Id == id ? null : content.Id;
|
|
}
|
|
}
|
|
|
|
foreach (var categorie in map.MapCategories)
|
|
{
|
|
// TODO
|
|
/*categorie.iconUrl = categorie.iconResourceId == id ? null : categorie.iconUrl;
|
|
categorie.iconResourceId = categorie.iconResourceId == id ? null : categorie.iconResourceId;*/
|
|
}
|
|
//section.Data = JsonConvert.SerializeObject(mapDTO);
|
|
break;
|
|
case SectionSlider slider:
|
|
//SliderDTO sliderDTO = JsonConvert.DeserializeObject<SliderDTO>(section.Data);
|
|
/*List<ContentDTO> contentsToKeep = new List<ContentDTO>();
|
|
foreach (var content in slider.Contents)
|
|
{
|
|
if (content.ResourceId != id)
|
|
contentsToKeep.Add(content);
|
|
}*/
|
|
// TODO TEST
|
|
slider.SliderContents = slider.SliderContents.Where(c => c.ResourceId != id).ToList();
|
|
//section.Data = JsonConvert.SerializeObject(sliderDTO);
|
|
break;
|
|
// TODO
|
|
/*case SectionType.Quizz:
|
|
QuizDTO quizzDTO = JsonConvert.DeserializeObject<QuizDTO>(section.Data);
|
|
foreach (var question in quizzDTO.questions)
|
|
{
|
|
if (question.label != null)
|
|
{
|
|
foreach (var questionLabel in question.label)
|
|
{
|
|
|
|
questionLabel.resourceUrl = questionLabel.resourceId == id ? null : questionLabel.resourceUrl;
|
|
questionLabel.resourceId = questionLabel.resourceId == id ? null : questionLabel.resourceId;
|
|
}
|
|
}
|
|
|
|
question.imageBackgroundResourceUrl = question.imageBackgroundResourceId == id ? null : question.imageBackgroundResourceUrl;
|
|
question.imageBackgroundResourceId = question.imageBackgroundResourceId == id ? null : question.imageBackgroundResourceId;
|
|
|
|
foreach (var response in question.responses)
|
|
{
|
|
if (response.label != null)
|
|
{
|
|
foreach (var responseLabel in response.label)
|
|
{
|
|
responseLabel.resourceUrl = responseLabel.resourceId == id ? null : responseLabel.resourceUrl;
|
|
responseLabel.resourceId = responseLabel.resourceId == id ? null : responseLabel.resourceId;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (quizzDTO.bad_level != null)
|
|
{
|
|
if (quizzDTO.bad_level.label != null)
|
|
{
|
|
foreach (var badLevelLabel in quizzDTO.bad_level.label)
|
|
{
|
|
badLevelLabel.resourceUrl = badLevelLabel.resourceId == id ? null : badLevelLabel.resourceUrl;
|
|
badLevelLabel.resourceId = badLevelLabel.resourceId == id ? null : badLevelLabel.resourceId;
|
|
}
|
|
}
|
|
}
|
|
if (quizzDTO.medium_level != null)
|
|
{
|
|
if (quizzDTO.medium_level.label != null)
|
|
{
|
|
foreach (var medium_levelLabel in quizzDTO.medium_level.label)
|
|
{
|
|
medium_levelLabel.resourceUrl = medium_levelLabel.resourceId == id ? null : medium_levelLabel.resourceUrl;
|
|
medium_levelLabel.resourceId = medium_levelLabel.resourceId == id ? null : medium_levelLabel.resourceId;
|
|
}
|
|
}
|
|
}
|
|
if (quizzDTO.good_level != null)
|
|
{
|
|
if (quizzDTO.good_level.label != null)
|
|
{
|
|
foreach (var gooLevelLabel in quizzDTO.good_level.label)
|
|
{
|
|
gooLevelLabel.resourceUrl = gooLevelLabel.resourceId == id ? null : gooLevelLabel.resourceUrl;
|
|
gooLevelLabel.resourceId = gooLevelLabel.resourceId == id ? null : gooLevelLabel.resourceId;
|
|
}
|
|
}
|
|
}
|
|
if (quizzDTO.great_level != null)
|
|
{
|
|
if (quizzDTO.great_level.label != null)
|
|
{
|
|
foreach (var greatLevelLabel in quizzDTO.great_level.label)
|
|
{
|
|
greatLevelLabel.resourceUrl = greatLevelLabel.resourceId == id ? null : greatLevelLabel.resourceUrl;
|
|
greatLevelLabel.resourceId = greatLevelLabel.resourceId == id ? null : greatLevelLabel.resourceId;
|
|
}
|
|
}
|
|
}
|
|
section.Data = JsonConvert.SerializeObject(quizzDTO);
|
|
break;*/
|
|
case SectionArticle article:
|
|
/*ArticleDTO articleDTO = JsonConvert.DeserializeObject<ArticleDTO>(section.Data);
|
|
List<ContentDTO> contentsArticleToKeep = new List<ContentDTO>();*/
|
|
/*foreach (var content in article.contents)
|
|
{
|
|
if (content.resourceId != id)
|
|
contentsArticleToKeep.Add(content);
|
|
}*/
|
|
// TODO TEEEEEEEEEEESST
|
|
//articleDTO.contents = contentsArticleToKeep;
|
|
article.ArticleContents = article.ArticleContents.Where(c => c.ResourceId != id).ToList();
|
|
//section.Data = JsonConvert.SerializeObject(articleDTO);
|
|
break;
|
|
}
|
|
|
|
_myInfoMateDbContext.SaveChanges();
|
|
//_sectionService.Update(section.Id, section);
|
|
}
|
|
|
|
//_resourceService.Remove(id);
|
|
_myInfoMateDbContext.Remove(resource);
|
|
_myInfoMateDbContext.SaveChanges();
|
|
|
|
return new ObjectResult("The resource has been deleted") { StatusCode = 202 };
|
|
|
|
}
|
|
catch (ArgumentNullException ex)
|
|
{
|
|
return new BadRequestObjectResult(ex.Message) { };
|
|
}
|
|
catch (KeyNotFoundException ex)
|
|
{
|
|
return new NotFoundObjectResult(ex.Message) { };
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return new ObjectResult(ex.Message) { StatusCode = 500 };
|
|
}
|
|
}
|
|
}
|
|
}
|