From 571f99876be90121c0cfa882d50c8a901d1635a6 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 17 May 2021 09:11:26 -0500 Subject: fix warnings --- src/slskd/API/Controllers/UserController.cs | 33 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'src/slskd/API/Controllers/UserController.cs') diff --git a/src/slskd/API/Controllers/UserController.cs b/src/slskd/API/Controllers/UserController.cs index 73efca0f..8c9d399f 100644 --- a/src/slskd/API/Controllers/UserController.cs +++ b/src/slskd/API/Controllers/UserController.cs @@ -1,13 +1,30 @@ -namespace slskd.API.Controllers +// +// Copyright (c) slskd Team. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see https://www.gnu.org/licenses/. +// + +namespace slskd.API.Controllers { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; - using Soulseek; using slskd.API.DTO; using slskd.Trackers; + using Soulseek; /// /// Users @@ -30,8 +47,8 @@ BrowseTracker = browseTracker; } - private ISoulseekClient Client { get; } private IBrowseTracker BrowseTracker { get; } + private ISoulseekClient Client { get; } /// /// Retrieves the address of the specified . @@ -43,7 +60,7 @@ [Authorize] [ProducesResponseType(typeof(UserAddress), 200)] [ProducesResponseType(404)] - public async Task Address([FromRoute, Required]string username) + public async Task Address([FromRoute, Required] string username) { try { @@ -65,7 +82,7 @@ [Authorize] [ProducesResponseType(typeof(IEnumerable), 200)] [ProducesResponseType(404)] - public async Task Browse([FromRoute, Required]string username) + public async Task Browse([FromRoute, Required] string username) { try { @@ -94,7 +111,7 @@ [Authorize] [ProducesResponseType(typeof(decimal), 200)] [ProducesResponseType(404)] - public IActionResult BrowseStatus([FromRoute, Required]string username) + public IActionResult BrowseStatus([FromRoute, Required] string username) { if (BrowseTracker.TryGet(username, out var progress)) { @@ -113,7 +130,7 @@ [Authorize] [ProducesResponseType(typeof(UserInfo), 200)] [ProducesResponseType(404)] - public async Task Info([FromRoute, Required]string username) + public async Task Info([FromRoute, Required] string username) { try { @@ -135,7 +152,7 @@ [Authorize] [ProducesResponseType(typeof(UserStatus), 200)] [ProducesResponseType(404)] - public async Task Status([FromRoute, Required]string username) + public async Task Status([FromRoute, Required] string username) { try { -- cgit v1.2.3