mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 19:25:16 +00:00
17 lines
366 B
JavaScript
Executable File
17 lines
366 B
JavaScript
Executable File
import * as db from "m3o/db";
|
|
|
|
// Update a record in the database. Include an "id" in the record to update.
|
|
async function UpdateArecord() {
|
|
let dbService = new db.DbService(process.env.MICRO_API_TOKEN);
|
|
let rsp = await dbService.update({
|
|
record: {
|
|
age: 43,
|
|
id: "1",
|
|
},
|
|
table: "users",
|
|
});
|
|
console.log(rsp);
|
|
}
|
|
|
|
await UpdateArecord();
|