neeto-commons-backend 1.0.108 → 1.0.109
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/controllers/neeto_commons_backend/api/direct_uploads_controller.rb +3 -3
- data/app/controllers/neeto_editor/api/v1/direct_uploads_controller.rb +17 -0
- data/app/models/neeto_editor/asset.rb +10 -0
- data/app/models/neeto_editor.rb +7 -0
- data/lib/neeto_commons_backend/common_files/package-common.json +1 -2
- data/lib/neeto_commons_backend/routes/neeto_editor.rb +13 -0
- data/lib/neeto_commons_backend/version.rb +1 -1
- data/package.json +1 -1
- data/yarn.lock +4 -4
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd7352b3f3f0177ac9284d8e5ee6048499d223a91abe484ce7eb0aec7de2e01d
|
4
|
+
data.tar.gz: 1cd5a44a254214877540c0b344409aa40ea05f6dd1dc7c86b5c1d7fc2115e5c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7510f362e7b76ac4f35422e2c2bdba60eb72401842803841796c6ff62c37176514baf56eeba7c5e479f3062687f570ac450cb7a8b8d0fb09efe338406720b08a
|
7
|
+
data.tar.gz: bde249517dc70f8b4f5ca79fed0cdcd5cbbdcfcb4770c2b24f76c1e34af5ddff7bb4559d00f79908276ef4b4a5583fce04986b903d9ca2ea051cb6a1cb99aa48
|
data/Gemfile.lock
CHANGED
@@ -7,9 +7,9 @@ module NeetoCommonsBackend
|
|
7
7
|
before_action :load_blob!, only: %i[update destroy]
|
8
8
|
|
9
9
|
def create
|
10
|
-
blob = ActiveStorage::Blob.create_before_direct_upload!(**blob_args)
|
11
|
-
blob_url = url_for(blob)
|
12
|
-
render json: direct_upload_json(blob).merge(blob_url:)
|
10
|
+
@blob = ActiveStorage::Blob.create_before_direct_upload!(**blob_args)
|
11
|
+
blob_url = url_for(@blob)
|
12
|
+
render json: direct_upload_json(@blob).merge(blob_url:)
|
13
13
|
end
|
14
14
|
|
15
15
|
def update
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class NeetoEditor::Api::V1::DirectUploadsController < NeetoCommonsBackend::Api::DirectUploadsController
|
4
|
+
before_action :destroy_editor_asset!, only: :destroy
|
5
|
+
|
6
|
+
def attach
|
7
|
+
blob = ActiveStorage::Blob.find(params[:id])
|
8
|
+
@organization.neeto_editor_assets.create!(blob_id: blob.id, file: blob)
|
9
|
+
render_success
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def destroy_editor_asset!
|
15
|
+
@organization.neeto_editor_assets.find_by_blob_id(@blob.id)&.destroy!
|
16
|
+
end
|
17
|
+
end
|
@@ -28,7 +28,7 @@
|
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
30
|
"@babel/eslint-parser": "7.17.0",
|
31
|
-
"@bigbinary/eslint-plugin-neeto": "1.0.
|
31
|
+
"@bigbinary/eslint-plugin-neeto": "1.0.50",
|
32
32
|
"eslint": "8.14.0",
|
33
33
|
"eslint-config-prettier": "8.5.0",
|
34
34
|
"eslint-plugin-cypress": "2.12.1",
|
@@ -54,7 +54,6 @@
|
|
54
54
|
"@bigbinary/babel-preset-neeto": "^1.0.3",
|
55
55
|
"@babel/preset-typescript": "^7.18.6",
|
56
56
|
"@babel/runtime": "^7.19.0",
|
57
|
-
"@bigbinary/neeto-editor": "1.26.13",
|
58
57
|
"@bigbinary/neeto-filters-frontend": "2.11.6",
|
59
58
|
"@bigbinary/neeto-icons": "1.11.0",
|
60
59
|
"@bigbinary/neeto-commons-frontend": "2.0.74",
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Rails.application.routes.draw do
|
4
|
+
namespace :neeto_editor do
|
5
|
+
namespace :api do
|
6
|
+
namespace :v1 do
|
7
|
+
resources :direct_uploads, only: %i[create update destroy] do
|
8
|
+
post :attach, on: :collection
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/package.json
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
"@babel/plugin-transform-runtime": "7.17.10",
|
9
9
|
"@babel/preset-env": "7.17.10",
|
10
10
|
"@babel/preset-react": "7.16.7",
|
11
|
-
"@bigbinary/eslint-plugin-neeto": "1.0.
|
11
|
+
"@bigbinary/eslint-plugin-neeto": "1.0.50",
|
12
12
|
"@bigbinary/neeto-commons-frontend": "2.0.74",
|
13
13
|
"eslint": "8.14.0",
|
14
14
|
"eslint-config-prettier": "8.5.0",
|
data/yarn.lock
CHANGED
@@ -967,10 +967,10 @@
|
|
967
967
|
"@babel/helper-validator-identifier" "^7.18.6"
|
968
968
|
to-fast-properties "^2.0.0"
|
969
969
|
|
970
|
-
"@bigbinary/eslint-plugin-neeto@1.0.
|
971
|
-
version "1.0.
|
972
|
-
resolved "https://registry.yarnpkg.com/@bigbinary/eslint-plugin-neeto/-/eslint-plugin-neeto-1.0.
|
973
|
-
integrity sha512-
|
970
|
+
"@bigbinary/eslint-plugin-neeto@1.0.50":
|
971
|
+
version "1.0.50"
|
972
|
+
resolved "https://registry.yarnpkg.com/@bigbinary/eslint-plugin-neeto/-/eslint-plugin-neeto-1.0.50.tgz#d5a518ef958d35f78a00ee7e6cf85cb679593e57"
|
973
|
+
integrity sha512-xQmLyj/QQ7EXtPHv51BGpHwUIgnbQmGZHJuvFQX5lOdOYAroRebnMzXXNwusY0Bs/aaWSJybrZjjvrE1G/Ldjg==
|
974
974
|
|
975
975
|
"@bigbinary/neeto-commons-frontend@2.0.74":
|
976
976
|
version "2.0.74"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neeto-commons-backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.109
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Prasanth Chaduvula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -302,9 +302,12 @@ files:
|
|
302
302
|
- app/controllers/neeto_commons_backend/failures_controller.rb
|
303
303
|
- app/controllers/neeto_commons_backend/health_check_controller.rb
|
304
304
|
- app/controllers/neeto_commons_backend/well_knowns_controller.rb
|
305
|
+
- app/controllers/neeto_editor/api/v1/direct_uploads_controller.rb
|
305
306
|
- app/mailers/neeto_commons_backend/application_mailer.rb
|
306
307
|
- app/models/concerns/neeto_commons_backend/sluggable.rb
|
307
308
|
- app/models/concerns/neeto_commons_backend/soft_deletable.rb
|
309
|
+
- app/models/neeto_editor.rb
|
310
|
+
- app/models/neeto_editor/asset.rb
|
308
311
|
- app/services/neeto_commons_backend/sample_data/common/admin_service.rb
|
309
312
|
- app/services/neeto_commons_backend/sample_data/common/app_organization_service.rb
|
310
313
|
- app/services/neeto_commons_backend/sample_data/common/base.rb
|
@@ -457,6 +460,7 @@ files:
|
|
457
460
|
- lib/neeto_commons_backend/routes/errors.rb
|
458
461
|
- lib/neeto_commons_backend/routes/health.rb
|
459
462
|
- lib/neeto_commons_backend/routes/letter_opener.rb
|
463
|
+
- lib/neeto_commons_backend/routes/neeto_editor.rb
|
460
464
|
- lib/neeto_commons_backend/routes/sidekiq.rb
|
461
465
|
- lib/neeto_commons_backend/routes/well_knowns.rb
|
462
466
|
- lib/neeto_commons_backend/scripts/sync_with_wheel.sh
|