diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-05-17 09:11:26 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-05-17 09:11:26 -0500 |
| commit | 571f99876be90121c0cfa882d50c8a901d1635a6 (patch) | |
| tree | 68f17fc4b88bdf2390e6f5423538570a2998ca91 /src/slskd/API/Controllers/UserController.cs | |
| parent | 2655fe1c7c80df98f0fee32fc9d63323f106a373 (diff) | |
| download | slskd-571f99876be90121c0cfa882d50c8a901d1635a6.tar.gz | |
fix warnings
Diffstat (limited to 'src/slskd/API/Controllers/UserController.cs')
| -rw-r--r-- | src/slskd/API/Controllers/UserController.cs | 33 |
1 files changed, 25 insertions, 8 deletions
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 file="UserController.cs" company="slskd Team"> +// 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/. +// </copyright> + +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; /// <summary> /// Users @@ -30,8 +47,8 @@ BrowseTracker = browseTracker; } - private ISoulseekClient Client { get; } private IBrowseTracker BrowseTracker { get; } + private ISoulseekClient Client { get; } /// <summary> /// Retrieves the address of the specified <paramref name="username"/>. @@ -43,7 +60,7 @@ [Authorize] [ProducesResponseType(typeof(UserAddress), 200)] [ProducesResponseType(404)] - public async Task<IActionResult> Address([FromRoute, Required]string username) + public async Task<IActionResult> Address([FromRoute, Required] string username) { try { @@ -65,7 +82,7 @@ [Authorize] [ProducesResponseType(typeof(IEnumerable<Directory>), 200)] [ProducesResponseType(404)] - public async Task<IActionResult> Browse([FromRoute, Required]string username) + public async Task<IActionResult> 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<IActionResult> Info([FromRoute, Required]string username) + public async Task<IActionResult> Info([FromRoute, Required] string username) { try { @@ -135,7 +152,7 @@ [Authorize] [ProducesResponseType(typeof(UserStatus), 200)] [ProducesResponseType(404)] - public async Task<IActionResult> Status([FromRoute, Required]string username) + public async Task<IActionResult> Status([FromRoute, Required] string username) { try { |
