[server] Change method type
This commit is contained in:
@@ -424,7 +424,7 @@ func main() {
|
||||
privateAPI.GET("/files/preview/v2/:fileID", fileHandler.GetThumbnail)
|
||||
|
||||
privateAPI.PUT("/files/data", fileHandler.PutFileData)
|
||||
privateAPI.PUT("/files/data/status-diff", fileHandler.FileDataStatusDiff)
|
||||
privateAPI.POST("/files/data/status-diff", fileHandler.FileDataStatusDiff)
|
||||
privateAPI.POST("/files/data/fetch", fileHandler.GetFilesData)
|
||||
privateAPI.GET("/files/data/fetch", fileHandler.GetFileData)
|
||||
privateAPI.GET("/files/data/preview-upload-url", fileHandler.GetPreviewUploadURL)
|
||||
|
||||
@@ -48,9 +48,11 @@ func (h *FileHandler) GetFilesData(ctx *gin.Context) {
|
||||
ctx.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
||||
// FileDataStatusDiff API won't really return status/diff for deleted files. The clients will primarily use this data to identify for which all files we already have preview generated or it's ML inference is done.
|
||||
// This doesn't simulate perfect diff behaviour as we won't maintain a tombstone entries for the deleted API.
|
||||
func (h *FileHandler) FileDataStatusDiff(ctx *gin.Context) {
|
||||
var req fileData.IndexDiffRequest
|
||||
if err := ctx.ShouldBindQuery(&req); err != nil {
|
||||
if err := ctx.ShouldBindJSON(&req); err != nil {
|
||||
ctx.JSON(http.StatusBadRequest, ente.NewBadRequestWithMessage(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user