Skip to content

Commit

Permalink
Updated version inputs (#3655)
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-Morgan authored Nov 13, 2024
2 parents af1b479 + 9b90159 commit 0a206c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Core/Core/Api/GraphQL/Inputs/VersionInputs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Speckle.Core.Api.GraphQL.Inputs;

public sealed record UpdateVersionInput(string versionId, string? message);
public sealed record UpdateVersionInput(string versionId, string projectId, string? message);

public sealed record MoveVersionsInput(string targetModelName, IReadOnlyList<string> versionIds);
public sealed record MoveVersionsInput(string projectId, string targetModelName, IReadOnlyList<string> versionIds);

public sealed record DeleteVersionsInput(IReadOnlyList<string> versionIds);
public sealed record DeleteVersionsInput(IReadOnlyList<string> versionIds, string projectId);
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public async Task VersionUpdate()
{
const string NEW_MESSAGE = "MY new version message";

UpdateVersionInput input = new(_version.id, NEW_MESSAGE);
UpdateVersionInput input = new(_version.id, _project.id, NEW_MESSAGE);
Version updatedVersion = await Sut.Update(input);

Assert.That(updatedVersion, Has.Property(nameof(Version.id)).EqualTo(_version.id));
Expand All @@ -91,7 +91,7 @@ public async Task VersionUpdate()
[Test]
public async Task VersionMoveToModel()
{
MoveVersionsInput input = new(_model2.name, new[] { _version.id });
MoveVersionsInput input = new(_project.id, _model2.name, new[] { _version.id });
string id = await Sut.MoveToModel(input);
Assert.That(id, Is.EqualTo(_model2.id));
Version movedVersion = await Sut.Get(_version.id, _model2.id, _project.id);
Expand All @@ -106,7 +106,7 @@ public async Task VersionMoveToModel()
[Test]
public async Task VersionDelete()
{
DeleteVersionsInput input = new(new[] { _version.id });
DeleteVersionsInput input = new(new[] { _version.id }, _project.id);

bool response = await Sut.Delete(input);
Assert.That(response, Is.True);
Expand Down

0 comments on commit 0a206c7

Please sign in to comment.