import getPool from "@cocalc/database/pool" ; export default async function hasPassword ( account_id ) { const pool = getPool ( "short" ) ; const { rows } = await pool . query ( "SELECT password_hash FROM accounts WHERE account_id=$1::UUID" , [ account_id ] ) ; if ( rows . length == 0 ) { throw Error ( "no such account" ) ; } return ! ! rows [ 0 ] . password_hash ; }