Refactoring, database structure changed

This commit is contained in:
2025-03-03 00:56:32 +01:00
Unverified
parent d3805ef3db
commit c603c41c0b
913 changed files with 21764 additions and 32775 deletions

View File

@@ -0,0 +1,41 @@
using Refit;
using WatchIt.DTO.Models.Controllers.Photos.Photo;
using WatchIt.DTO.Models.Controllers.Photos.PhotoBackground;
using WatchIt.DTO.Query;
namespace WatchIt.Website.Clients;
public interface IPhotosClient
{
#region Main
[Get("/{id}")]
Task<IApiResponse<PhotoResponse>> GetPhoto(Guid id);
[Get("/")]
Task<IApiResponse<IEnumerable<PhotoResponse>>> GetPhotos([Query] PhotoFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null);
[Post("/")]
Task<IApiResponse<PhotoResponse>> PostPhoto([Authorize]string token, [Body] PhotoRequest body);
[Put("/{id}")]
Task<IApiResponse> PutPhoto([Authorize]string token, Guid id, [Body] PhotoRequest body);
[Delete("/{id}")]
Task<IApiResponse> DeletePhoto([Authorize]string token, Guid id);
#endregion
#region Background
[Get("/background")]
Task<IApiResponse<PhotoResponse>> GetPhotoBackground();
[Put("/{photo_id}/background")]
Task<IApiResponse<PhotoBackgroundResponse>> PutPhotoBackground([Authorize]string token, [AliasAs("photo_id")] Guid photoId, [Body] PhotoBackgroundRequest body);
[Delete("/{photo_id}/background")]
Task<IApiResponse> DeletePhotoBackground([Authorize]string token, [AliasAs("photo_id")] Guid photoId);
#endregion
}