mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-30 00:22:40 +01:00
Fix get endpoint for DreamMakeClient and Jobs Clients to accept entity IDs
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Tgstation.Server.Client.Components
|
||||
public Task<Job> Compile(CancellationToken cancellationToken) => apiClient.Create<Job>(Routes.DreamMaker, instance.Id, cancellationToken);
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<CompileJob> GetCompileJob(CompileJob compileJob, CancellationToken cancellationToken) => apiClient.Read<CompileJob>(Routes.SetID(Routes.DreamMaker, compileJob?.Id ?? throw new ArgumentNullException(nameof(compileJob))), instance.Id, cancellationToken);
|
||||
public Task<CompileJob> GetCompileJob(EntityId compileJob, CancellationToken cancellationToken) => apiClient.Read<CompileJob>(Routes.SetID(Routes.DreamMaker, compileJob?.Id ?? throw new ArgumentNullException(nameof(compileJob))), instance.Id, cancellationToken);
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<IReadOnlyList<EntityId>> GetJobIds(CancellationToken cancellationToken) => apiClient.Read<IReadOnlyList<EntityId>>(Routes.ListRoute(Routes.DreamMaker), instance.Id, cancellationToken);
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace Tgstation.Server.Client.Components
|
||||
/// <summary>
|
||||
/// Get a <paramref name="compileJob"/>
|
||||
/// </summary>
|
||||
/// <param name="compileJob">The <see cref="CompileJob"/> to get</param>
|
||||
/// <param name="compileJob">The <see cref="CompileJob"/> <see cref="EntityId"/> to get</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> resulting in the <see cref="CompileJob"/></returns>
|
||||
Task<CompileJob> GetCompileJob(CompileJob compileJob, CancellationToken cancellationToken);
|
||||
Task<CompileJob> GetCompileJob(EntityId compileJob, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,10 +27,10 @@ namespace Tgstation.Server.Client.Components
|
||||
/// <summary>
|
||||
/// Get a <paramref name="job"/>
|
||||
/// </summary>
|
||||
/// <param name="job">The <see cref="Job"/> to get</param>
|
||||
/// <param name="job">The <see cref="Job"/>'s <see cref="EntityId"/> to get</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> resulting in the <see cref="Job"/></returns>
|
||||
Task<Job> GetId(Job job, CancellationToken cancellationToken);
|
||||
Task<Job> GetId(EntityId job, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Cancels a <paramref name="job"/>
|
||||
|
||||
@@ -41,6 +41,6 @@ namespace Tgstation.Server.Client.Components
|
||||
public Task<IReadOnlyList<Job>> ListActive(CancellationToken cancellationToken) => apiClient.Read<IReadOnlyList<Job>>(Routes.Jobs, instance.Id, cancellationToken);
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<Job> GetId(Job job, CancellationToken cancellationToken) => apiClient.Read<Job>(Routes.SetID(Routes.Jobs, job?.Id ?? throw new ArgumentNullException(nameof(job))), instance.Id, cancellationToken);
|
||||
public Task<Job> GetId(EntityId job, CancellationToken cancellationToken) => apiClient.Read<Job>(Routes.SetID(Routes.Jobs, job?.Id ?? throw new ArgumentNullException(nameof(job))), instance.Id, cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user