Files
services/examples/user/read/node/readAccountByUsernameOrEmail.js
2021-09-16 12:52:36 +01:00

13 lines
361 B
JavaScript
Executable File

import * as user from "m3o/user";
// Read an account by id, username or email. Only one need to be specified.
async function ReadAccountByUsernameOrEmail() {
let userService = new user.UserService(process.env.MICRO_API_TOKEN);
let rsp = await userService.read({
username: "usrname-1",
});
console.log(rsp);
}
await ReadAccountByUsernameOrEmail();