File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -653,8 +653,14 @@ const getUserImageForVerification = async (req, res) => {
653653const updateUser = async ( req , res ) => {
654654 try {
655655 const { id : profileDiffId , message } = req . body ;
656-
657- const profileDiffData = await profileDiffsQuery . fetchProfileDiffUnobfuscated ( profileDiffId ) ;
656+ const devFeatureFlag = req . query . dev ;
657+ let profileDiffData ;
658+ if ( devFeatureFlag === "true" ) {
659+ profileDiffData = await profileDiffsQuery . fetchProfileDiffUnobfuscated ( profileDiffId ) ;
660+ } else {
661+ profileDiffData = await profileDiffsQuery . fetchProfileDiff ( profileDiffId ) ;
662+ }
663+ Object . freeze ( profileDiffData ) ;
658664 if ( ! profileDiffData ) return res . boom . notFound ( "Profile Diff doesn't exist" ) ;
659665
660666 const { approval, timestamp, userId, ...profileDiff } = profileDiffData ;
You can’t perform that action at this time.
0 commit comments