@@ -51,6 +51,19 @@ const candosSchema = {
51
51
const saveRemoteImages = require ( '../../hooks/save-remote-images' ) ;
52
52
const createDefaultAvatar = require ( '../../hooks/create-default-avatar' ) ;
53
53
54
+ const thumbnailOptions = {
55
+ avatar : {
56
+ small : '72x72/smart' ,
57
+ medium : '120x120/smart' ,
58
+ large : '240x240/smart' ,
59
+ placeholder : '36x36/smart/filters:blur(30)'
60
+ } ,
61
+ coverImg : {
62
+ cover : '1102x312/smart' ,
63
+ coverPlaceholder : '243x100/smart/filters:blur(30)'
64
+ }
65
+ } ;
66
+
54
67
module . exports = {
55
68
before : {
56
69
all : [ ] ,
@@ -116,27 +129,11 @@ module.exports = {
116
129
cleanupBasicData
117
130
] ,
118
131
find : [
119
- thumbnails ( {
120
- avatar : {
121
- small : '72x72/smart' ,
122
- medium : '120x120/smart' ,
123
- large : '240x240/smart'
124
- }
125
- } ) ,
132
+ thumbnails ( thumbnailOptions ) ,
126
133
cleanupPersonalData
127
134
] ,
128
135
get : [
129
- thumbnails ( {
130
- avatar : {
131
- small : '72x72/smart' ,
132
- medium : '120x120/smart' ,
133
- large : '240x240/smart'
134
- } ,
135
- coverImg : {
136
- cover : '1102x312/smart' ,
137
- coverPlaceholder : '243x100/smart/filters:blur(30)'
138
- }
139
- } ) ,
136
+ thumbnails ( thumbnailOptions ) ,
140
137
cleanupPersonalData
141
138
] ,
142
139
create : [
@@ -146,9 +143,12 @@ module.exports = {
146
143
when ( isProvider ( 'external' ) ,
147
144
removeVerification ( )
148
145
) ,
146
+ thumbnails ( thumbnailOptions ) ,
149
147
inviteCode . after
150
148
] ,
151
- update : [ ] ,
149
+ update : [
150
+ thumbnails ( thumbnailOptions )
151
+ ] ,
152
152
patch : [ ] ,
153
153
remove : [ ]
154
154
} ,
0 commit comments