Skip to content

Commit

Permalink
Automated dotnet-format update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 18, 2024
1 parent 3471349 commit d1bb6c2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
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

0 comments on commit d1bb6c2

Please sign in to comment.