From 530e4ac65dc7fba7724fdacf1590bd8ee1e2ca6d Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Mon, 1 Apr 2024 20:23:59 +0200 Subject: [PATCH] [frontend] Note descendants & ascendants should be lists --- .../Core/ControllerModels/NoteControllerModel.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Iceshrimp.Frontend/Core/ControllerModels/NoteControllerModel.cs b/Iceshrimp.Frontend/Core/ControllerModels/NoteControllerModel.cs index 573af15a..5dcd0ed7 100644 --- a/Iceshrimp.Frontend/Core/ControllerModels/NoteControllerModel.cs +++ b/Iceshrimp.Frontend/Core/ControllerModels/NoteControllerModel.cs @@ -10,17 +10,17 @@ internal class NoteControllerModel(HttpClient api) { public Task GetNote(string id) => api.CallNullable(HttpMethod.Get, $"/note/{id}"); - public Task GetNoteAscendants(string id, [DefaultValue(20)] [Range(1, 100)] int? limit) + public Task?> GetNoteAscendants(string id, [DefaultValue(20)] [Range(1, 100)] int? limit) { var query = new QueryString(); if (limit.HasValue) query.Add("limit", limit.ToString()); - return api.CallNullable(HttpMethod.Get, $"/note/{id}/ascendants", query); + return api.CallNullable>(HttpMethod.Get, $"/note/{id}/ascendants", query); } - public Task GetNoteDescendants(string id, [DefaultValue(20)] [Range(1, 100)] int? depth) + public Task?> GetNoteDescendants(string id, [DefaultValue(20)] [Range(1, 100)] int? depth) { var query = new QueryString(); if (depth.HasValue) query.Add("depth", depth.ToString()); - return api.CallNullable(HttpMethod.Get, $"/note/{id}/descendants", query); + return api.CallNullable>(HttpMethod.Get, $"/note/{id}/descendants", query); } } \ No newline at end of file