feat: Enhance texture upload functionality and API response format
- Introduced a new upload endpoint for direct texture file uploads, allowing users to upload textures with validation for size and format. - Updated existing texture-related API responses to a standardized format, improving consistency across the application. - Refactored texture service methods to handle file uploads and reuse existing texture URLs based on hash checks. - Cleaned up Dockerfile and other files by removing unnecessary whitespace.
This commit is contained in:
@@ -47,7 +47,8 @@ type TextureRepository interface {
|
||||
Create(ctx context.Context, texture *model.Texture) error
|
||||
FindByID(ctx context.Context, id int64) (*model.Texture, error)
|
||||
FindByHash(ctx context.Context, hash string) (*model.Texture, error)
|
||||
FindByIDs(ctx context.Context, ids []int64) ([]*model.Texture, error) // 批量查询
|
||||
FindByHashAndUploaderID(ctx context.Context, hash string, uploaderID int64) (*model.Texture, error) // 根据Hash和上传者ID查找
|
||||
FindByIDs(ctx context.Context, ids []int64) ([]*model.Texture, error) // 批量查询
|
||||
FindByUploaderID(ctx context.Context, uploaderID int64, page, pageSize int) ([]*model.Texture, int64, error)
|
||||
Search(ctx context.Context, keyword string, textureType model.TextureType, publicOnly bool, page, pageSize int) ([]*model.Texture, int64, error)
|
||||
Update(ctx context.Context, texture *model.Texture) error
|
||||
|
||||
Reference in New Issue
Block a user