mirror of
https://git.recroomarchive.org/RecRoomArchive/RRAC.git
synced 2026-09-08 14:41:25 -07:00
387ec7ba89
Added basic info to get in game for like...August 2016 ;-; It's not much but it's a start
22 lines
585 B
C#
22 lines
585 B
C#
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);
|
|
}
|
|
}
|
|
} |