-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c17dfe
commit dc69b40
Showing
6 changed files
with
33 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
using MZikmund.DataContracts.Blog.Categories; | ||
using MZikmund.DataContracts.Blog; | ||
using Refit; | ||
|
||
namespace MZikmund.Api.Client; | ||
|
||
public partial interface IMZikmundApi | ||
{ | ||
[Get("/v1/blog/categories")] | ||
Task<ApiResponse<BlogCategoryDto[]>> GetBlogCategoriesAsync(); | ||
[Get("/v1/categories")] | ||
Task<ApiResponse<Category[]>> GetBlogCategoriesAsync(); | ||
|
||
[Post("/v1/blog/categories")] | ||
[Post("/v1/admin/categories")] | ||
[Headers("Authorization: Bearer")] | ||
Task<ApiResponse<BlogCategoryDto>> AddBlogCategoryAsync(BlogCategoryDto category); | ||
Task<ApiResponse<Category>> AddBlogCategoryAsync(Category category); // TODO: Should be EditCategory | ||
|
||
[Put("/v1/blog/categories/{categoryId}")] | ||
[Put("/v1/admin/categories/{categoryId}")] | ||
[Headers("Authorization: Bearer")] | ||
Task<ApiResponse<BlogCategoryDto>> UpdateCategoryAsync(int categoryId, BlogCategoryDto category); | ||
Task<ApiResponse<Category>> UpdateCategoryAsync(Guid categoryId, EditCategory category); | ||
|
||
[Delete("/v1/blog/categories/{categoryId}")] | ||
[Delete("/v1/admin/categories/{categoryId}")] | ||
[Headers("Authorization: Bearer")] | ||
Task<ApiResponse<object?>> DeleteBlogCategoryAsync(int categoryId); | ||
Task<ApiResponse<object?>> DeleteBlogCategoryAsync(Guid categoryId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
using MZikmund.DataContracts.Blog.Tags; | ||
using MZikmund.DataContracts.Blog; | ||
using Refit; | ||
|
||
namespace MZikmund.Api.Client; | ||
|
||
public partial interface IMZikmundApi | ||
{ | ||
[Get("/v1/blog/tags")] | ||
Task<ApiResponse<BlogTagDto[]>> GetBlogTagsAsync(); | ||
[Get("/v1/tags")] | ||
Task<ApiResponse<Tag[]>> GetBlogTagsAsync(); | ||
|
||
[Post("/v1/blog/tags")] | ||
[Post("/v1/admin/tags")] | ||
[Headers("Authorization: Bearer")] | ||
Task<ApiResponse<BlogTagDto>> AddBlogTagAsync([Body] BlogTagDto category); | ||
Task<ApiResponse<Tag>> AddBlogTagAsync([Body] Tag tag); // TODO: Should be EditTag | ||
|
||
[Put("/v1/blog/tags/{categoryId}")] | ||
[Put("/v1/admin/tags/{categoryId}")] | ||
[Headers("Authorization: Bearer")] | ||
Task<ApiResponse<BlogTagDto>> UpdateTagAsync(int categoryId, [Body] BlogTagDto category); | ||
Task<ApiResponse<Tag>> UpdateTagAsync(int categoryId, [Body] EditTag tag); | ||
|
||
[Delete("/v1/blog/tags/{categoryId}")] | ||
[Delete("/v1/admin/tags/{categoryId}")] | ||
[Headers("Authorization: Bearer")] | ||
Task<ApiResponse<object?>> DeleteBlogTagAsync(int categoryId); | ||
Task<ApiResponse<object?>> DeleteBlogTagAsync(int tagId); | ||
} |