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

Updated version inputs #3655

Merged
merged 1 commit into from
Nov 13, 2024
Merged
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
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