webpack/examples/top-level-await/UserApi.js

8 lines
215 B
JavaScript
Raw Normal View History

2020-08-04 20:15:08 +08:00
import { dbCall } from "./db-connection.js";
export const createUser = async name => {
command = `CREATE USER ${name}`;
2019-05-23 15:18:06 +08:00
// This is a normal await, because it's in an async function
await dbCall({ command });
2020-08-04 20:15:08 +08:00
};