mirror of
https://git.recroomarchive.org/RecRoomArchive/RRAC.git
synced 2026-09-08 14:41:25 -07:00
Initialize repository
Added basic info to get in game for like...August 2016 ;-; It's not much but it's a start
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using RecRoomArchive.Services;
|
||||
using System.Net.Mime;
|
||||
|
||||
namespace RecRoomArchive.Controllers.Images
|
||||
{
|
||||
[Route("img")]
|
||||
[ApiController]
|
||||
public class RootController(ImageService imageService) : ControllerBase
|
||||
{
|
||||
[HttpGet(template: "{imageName}")]
|
||||
public async Task<IActionResult> GetImage(string imageName)
|
||||
{
|
||||
var image = await imageService.GetImage(imageName);
|
||||
|
||||
if (image == null)
|
||||
return NotFound();
|
||||
|
||||
return File(image, MediaTypeNames.Image.Png);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user