mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: reintroducing thumbnails (#3821)
* Reintroducing thumbnails * Aligned with linting rules * making recomended code review change - changed method names to start with lower case as they are not used outside of their package - made receiver types for struct funcs to be pointers to not need to create copies Trying to cover all linting issues - converted slog warning to use attributes when logging warnings - seperated imports to have package files in their own section * Update go.mod --------- Co-authored-by: boojack <24653555+boojack@users.noreply.github.com>
This commit is contained in:
@@ -365,6 +365,11 @@ func (s *APIV1Service) DeleteMemo(ctx context.Context, request *v1pb.DeleteMemoR
|
||||
if err := s.Store.DeleteResource(ctx, &store.DeleteResource{ID: resource.ID}); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to delete resource")
|
||||
}
|
||||
|
||||
thumb := thumbnail{resource}
|
||||
if err := thumb.deleteFile(s.Profile.Data); err != nil {
|
||||
slog.Warn("failed to delete resource thumbnail")
|
||||
}
|
||||
}
|
||||
|
||||
// Delete memo comments
|
||||
|
Reference in New Issue
Block a user