mirror of
https://github.com/yawaflua/SkinsApi.git
synced 2025-12-10 20:39:35 +02:00
Add ping controller and cleaning code
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.RateLimiting;
|
||||
using SkinsApi.Interfaces.Services;
|
||||
|
||||
namespace SkinsApi.Controllers.v1
|
||||
{
|
||||
[Route("/api/v1/skin/")]
|
||||
[ApiController]
|
||||
|
||||
public class SkinsController (ISkinService skinService): ControllerBase
|
||||
|
||||
public class SkinsController(ISkinService skinService) : ControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Get user`s skin
|
||||
@@ -50,11 +49,12 @@ namespace SkinsApi.Controllers.v1
|
||||
try
|
||||
{
|
||||
return File((await skinService.GetSkinStreamAsync(user)).GetBody(width), "image/png");
|
||||
} catch(Exception ex)
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user