Skip to content

Commit

Permalink
Fixed deserialization for filestore
Browse files Browse the repository at this point in the history
  • Loading branch information
amaidniazi authored and Arlodotexe committed Nov 21, 2024
1 parent 05f17d1 commit cb401ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
7 changes: 1 addition & 6 deletions src/CoreApi/IFilesStoreApiObjectResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ public interface IFilesStoreApiObjectResponse
/// </summary>
public string FilePath { get; set; }

/// <summary>
/// The key to the Filestore.
/// </summary>
public IFilesStoreKey Key { get; set; }

/// <summary>
/// The response offset.
/// </summary>
Expand All @@ -47,7 +42,7 @@ public interface IFilesStoreKey
/// Key value.
/// </summary>
[JsonProperty("/")]
public string Value { get; set; }
public string _ { get; set; }
}

/// <summary>
Expand Down
10 changes: 5 additions & 5 deletions src/CoreApi/IKeyApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public interface IKeyApi
/// A task that represents the asynchronous operation. The task's result is
/// the key that was created.
/// </returns>
Task<IFilesStoreKey> CreateAsync(
Task<IKey> CreateAsync(
string name,
string keyType,
int size,
Expand All @@ -50,7 +50,7 @@ Task<IFilesStoreKey> CreateAsync(
/// A task that represents the asynchronous operation. The task's result is
/// a sequence of IPFS keys.
/// </returns>
Task<IEnumerable<IFilesStoreKey>> ListAsync(CancellationToken cancel = default);
Task<IEnumerable<IKey>> ListAsync(CancellationToken cancel = default);

/// <summary>
/// Delete the specified key.
Expand All @@ -65,7 +65,7 @@ Task<IFilesStoreKey> CreateAsync(
/// A task that represents the asynchronous operation. The task's result is
/// the key that was deleted, or null if the key is not present.
/// </returns>
Task<IFilesStoreKey?> RemoveAsync(string name, CancellationToken cancel = default);
Task<IKey?> RemoveAsync(string name, CancellationToken cancel = default);

/// <summary>
/// Rename the specified key.
Expand All @@ -83,7 +83,7 @@ Task<IFilesStoreKey> CreateAsync(
/// A task that represents the asynchronous operation. The task's result is
/// the new key after the rename.
/// </returns>
Task<IFilesStoreKey> RenameAsync(string oldName, string newName, CancellationToken cancel = default);
Task<IKey> RenameAsync(string oldName, string newName, CancellationToken cancel = default);

/// <summary>
/// Export a key to a PEM encoded password protected PKCS #8 container.
Expand Down Expand Up @@ -122,6 +122,6 @@ Task<IFilesStoreKey> CreateAsync(
/// A task that represents the asynchronous operation. The task's result
/// is the newly imported key.
/// </returns>
Task<IFilesStoreKey> ImportAsync(string name, string pem, char[]? password = null, CancellationToken cancel = default);
Task<IKey> ImportAsync(string name, string pem, char[]? password = null, CancellationToken cancel = default);
}
}

0 comments on commit cb401ce

Please sign in to comment.