mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-29 03:18:40 +00:00
Add attachment list API
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Spacebar.Models.Generic;
|
||||
|
||||
namespace Spacebar.Models.Api;
|
||||
|
||||
@@ -38,4 +39,20 @@ public class CreateAttachmentResponse {
|
||||
[JsonPropertyName("original_content_type")]
|
||||
public string? OriginalContentType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public class AttachmentListResponse {
|
||||
[JsonPropertyName("total")]
|
||||
public int Total { get; set; }
|
||||
|
||||
[JsonPropertyName("items")]
|
||||
public List<Entry> Items { get; set; }
|
||||
|
||||
public class Entry {
|
||||
[JsonPropertyName("attachment")]
|
||||
public MessageAttachment Attachment { get; set; }
|
||||
|
||||
[JsonPropertyName("message_reference")]
|
||||
public MessageReference MessageReference { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -6,4 +6,9 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Spacebar.Models.Generic\Spacebar.Models.Generic.csproj" Condition="'$(ContinuousIntegrationBuild)'!='true'"/>
|
||||
<PackageReference Include="Spacebar.Models.Generic" Version="*-preview*" Condition="'$(ContinuousIntegrationBuild)'=='true'"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user