Skip to content

Commit

Permalink
trying fleet
Browse files Browse the repository at this point in the history
  • Loading branch information
sombriks committed Jul 29, 2024
1 parent fa68aa1 commit 302f467
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .fleet/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"nodejs.typescript.rebuildOnChanges": true
}
7 changes: 4 additions & 3 deletions service-node-koa/app/controllers/usuario.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import {
delUsuario, getById,
delUsuario,
getById,
login,
novoUsuario,
resetCategorias,
resetConta,
updateUser,
validaInvite
} from '../services/index.mjs'
validaInvite,
} from "../services/index.mjs";
import { sign } from "../config/security/index.mjs";

export const userLoginRequest = async (ctx) => {
Expand Down
7 changes: 4 additions & 3 deletions service-node-koa/app/services/usuario.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export const login = async ({ email, senha }) => {
};

export const updateUser = async ({ id, nome, email, senha }) => {
return knex("usuario").where({ id }).update({ nome, email, senha: encrypt(senha) });
return knex("usuario")
.where({ id })
.update({ nome, email, senha: encrypt(senha) });
};

export const getById = async ({id}) =>
knex("usuario").where({ id }).first();
export const getById = async ({ id }) => knex("usuario").where({ id }).first();

0 comments on commit 302f467

Please sign in to comment.