Remove scheme specifiers
This commit is contained in:
@@ -154,7 +154,7 @@ public class PostController(
|
|||||||
);
|
);
|
||||||
|
|
||||||
var fileUrl = Url.Action(nameof(PatchFileContent), "Post",
|
var fileUrl = Url.Action(nameof(PatchFileContent), "Post",
|
||||||
new { postId = created.Post.Id, fileId = created.File.Id }, Request.Scheme
|
new { postId = created.Post.Id, fileId = created.File.Id }
|
||||||
);
|
);
|
||||||
return CreatedAtAction(nameof(Get), new { id = created.Post.Id },
|
return CreatedAtAction(nameof(Get), new { id = created.Post.Id },
|
||||||
PostDto.FromPost(created.Post, fileUrl));
|
PostDto.FromPost(created.Post, fileUrl));
|
||||||
@@ -319,7 +319,7 @@ public class PostController(
|
|||||||
var entry = await postService.GetById(id);
|
var entry = await postService.GetById(id);
|
||||||
if (entry == null) return NotFound();
|
if (entry == null) return NotFound();
|
||||||
var fileUrl = Url.Action(nameof(PatchFileContent), "Post",
|
var fileUrl = Url.Action(nameof(PatchFileContent), "Post",
|
||||||
new { postId = entry.Id, fileId = entry.File.Id }, Request.Scheme
|
new { postId = entry.Id, fileId = entry.File.Id }
|
||||||
);
|
);
|
||||||
return Ok(PostDto.FromPost(entry, fileUrl));
|
return Ok(PostDto.FromPost(entry, fileUrl));
|
||||||
}
|
}
|
||||||
@@ -340,7 +340,7 @@ public class PostController(
|
|||||||
var newItems = list.Items.Select(i =>
|
var newItems = list.Items.Select(i =>
|
||||||
{
|
{
|
||||||
var fileUrl = Url.Action(nameof(PatchFileContent), "Post",
|
var fileUrl = Url.Action(nameof(PatchFileContent), "Post",
|
||||||
new { postId = i.Id, fileId = i.File.Id }, Request.Scheme
|
new { postId = i.Id, fileId = i.File.Id }
|
||||||
);
|
);
|
||||||
return PostDto.FromPost(i, fileUrl);
|
return PostDto.FromPost(i, fileUrl);
|
||||||
}).ToList();
|
}).ToList();
|
||||||
@@ -433,7 +433,7 @@ public class PostController(
|
|||||||
|
|
||||||
var updated = await postService.Update(post);
|
var updated = await postService.Update(post);
|
||||||
var fileUrl = Url.Action(nameof(PatchFileContent), "Post",
|
var fileUrl = Url.Action(nameof(PatchFileContent), "Post",
|
||||||
new { postId = updated.Id, fileId = updated.File.Id }, Request.Scheme
|
new { postId = updated.Id, fileId = updated.File.Id }
|
||||||
);
|
);
|
||||||
return Ok(PostDto.FromPost(updated, fileUrl));
|
return Ok(PostDto.FromPost(updated, fileUrl));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user