import getPool from "@cocalc/database/pool" ; import passwordHash from "@cocalc/backend/auth/password-hash" ; export default async function setPassword ( account_id , password ) { const pool = getPool ( ) ; await pool . query ( "UPDATE accounts SET password_hash=$1 WHERE account_id=$2" , [ passwordHash ( password ) , account_id , ] ) ; }