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) => {
653
653
const updateUser = async ( req , res ) => {
654
654
try {
655
655
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 ) ;
658
664
if ( ! profileDiffData ) return res . boom . notFound ( "Profile Diff doesn't exist" ) ;
659
665
660
666
const { approval, timestamp, userId, ...profileDiff } = profileDiffData ;
You can’t perform that action at this time.
0 commit comments