You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
err := database.Postgres.QueryRow(`SELECT update_password, under_review FROM datastore.objects WHERE data_id=$1 AND upload_completed=TRUE AND deleted=FALSE`, dataID).Scan(
&updatePassword,
&underReview,
)
if err != nil {
if err == sql.ErrNoRows {
return nex.Errors.DataStore.NotFound
}
globals.Logger.Error(err.Error())
// TODO - Send more specific errors?
return nex.Errors.DataStore.Unknown
}
if updatePassword != 0 && updatePassword != password {
return nex.Errors.DataStore.InvalidPassword
}
if underReview {
return nex.Errors.DataStore.UnderReviewing
}
_, err = database.Postgres.Exec(`UPDATE datastore.objects SET meta_binary=$1 WHERE data_id=$2`, metaBinary, dataID)