Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated PR to fix formatting errors #223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public async Task<StringApiResultModel> RemoveNexusModsModManualLinkAsync(int mo

return await _implementation.RemoveNexusModsModManualLinkAsync(modId, userId, username, ct);
}

public async Task<StringApiResultModel> AddSteamWorkshopModManualLinkAsync(string modId, int? userId = null, string? username = null, CancellationToken ct = default)
{
return await _implementation.AddSteamWorkshopModManualLinkAsync(modId, userId, username, ct);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static bool TryFromModel(
var steamWorkshopModId = SteamWorkshopModId.DefaultValue;
steamWorkshopModId = SteamWorkshopModId.TryParseUrl(x.Url, out var steamWorkshopModIdVal) ? steamWorkshopModIdVal : steamWorkshopModId;
steamWorkshopModId = x.AdditionalMetadata.FirstOrDefault(x => x.Key == "SteamWorkshopModId") is { Value: { } steamWorkshopModIdStr } ? SteamWorkshopModId.From(steamWorkshopModIdStr) : steamWorkshopModId;

return new CrashReportToModuleMetadataEntity
{
TenantId = tenant,
Expand Down
2 changes: 1 addition & 1 deletion src/BUTR.Site.NexusMods.Server.Persistence/IUnitOfRead.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface IUnitOfRead : IDisposable, IAsyncDisposable
INexusModsModToNameEntityRepositoryRead NexusModsModName { get; }
INexusModsModToModuleInfoHistoryEntityRepositoryRead NexusModsModToModuleInfoHistory { get; }
INexusModsModToFileUpdateEntityRepositoryRead NexusModsModToFileUpdates { get; }

ISteamWorkshopModToModuleEntityRepositoryRead SteamWorkshopModModules { get; }
ISteamWorkshopModToNameEntityRepositoryRead SteamWorkshopModName { get; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using System.Threading;
using System.Threading.Tasks;
using BUTR.Site.NexusMods.Server.Models;
using BUTR.Site.NexusMods.Server.Models.API;
using BUTR.Site.NexusMods.Server.Models.Database;

using System.Threading;
using System.Threading.Tasks;

namespace BUTR.Site.NexusMods.Server.Repositories;

public sealed record UserManuallyLinkedSteamWorkshopModModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public async Task<bool> IsOwningGameAsync(SteamUserId steamUserId, uint appId, C
public async Task<List<SteamWorkshopItemInfo>> GetAllOwnedWorkshopItemAsync(SteamUserId steamUserId, uint appId, CancellationToken ct)
{
var list = new List<SteamWorkshopItemInfo>();
for (var page = 1;; page++)
for (var page = 1; ; page++)
{
var data = await GetAllOwnedWorkshopItemAsync(steamUserId, appId, page, ct);
if (data.Count == 0) break;
Expand All @@ -135,7 +135,7 @@ public async Task<List<SteamWorkshopItemInfo>> GetAllOwnedWorkshopItemAsync(Stea

return list;
}

private async Task<List<SteamWorkshopItemInfo>> GetAllOwnedWorkshopItemAsync(SteamUserId steamUserId, uint appId, int page, CancellationToken ct)
{
using var request = new HttpRequestMessage(HttpMethod.Get, $"IPublishedFileService/GetUserFiles/v1/?key={_options.APIKey}&steamid={steamUserId}&appid={appId}&return_short_description=true&numperpage=100&page={page}");
Expand Down