From d652ca9b2d8e995a1c5fa3219c98d6d3e78edbd9 Mon Sep 17 00:00:00 2001 From: amazing-username Date: Sun, 28 Apr 2019 22:53:04 +0000 Subject: [PATCH] Added compressed song download functionality to require authorization --- Controllers/SongCompressedDataControllers.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Controllers/SongCompressedDataControllers.cs b/Controllers/SongCompressedDataControllers.cs index 862b46f..672a57c 100644 --- a/Controllers/SongCompressedDataControllers.cs +++ b/Controllers/SongCompressedDataControllers.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; @@ -44,6 +45,7 @@ namespace Icarus.Controllers #region API Routes [HttpGet("{id}")] + [Authorize("download:songs")] public async Task Get(int id) { MusicStoreContext context = HttpContext.RequestServices