diff options
Diffstat (limited to 'app/assets/javascripts/static_site_editor/image_repository.js')
-rw-r--r-- | app/assets/javascripts/static_site_editor/image_repository.js | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/app/assets/javascripts/static_site_editor/image_repository.js b/app/assets/javascripts/static_site_editor/image_repository.js deleted file mode 100644 index 4ad2e2618ac..00000000000 --- a/app/assets/javascripts/static_site_editor/image_repository.js +++ /dev/null @@ -1,25 +0,0 @@ -import createFlash from '~/flash'; -import { __ } from '~/locale'; -import { getBinary } from './services/image_service'; - -const imageRepository = () => { - const images = new Map(); - const flash = (message) => - createFlash({ - message, - }); - - const add = (file, url) => { - getBinary(file) - .then((content) => images.set(url, content)) - .catch(() => flash(__('Something went wrong while inserting your image. Please try again.'))); - }; - - const get = (path) => images.get(path); - - const getAll = () => images; - - return { add, get, getAll }; -}; - -export default imageRepository; |