Skip to content

Commit

Permalink
feat: add company in user
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio Brasileiro authored and Fabio Brasileiro committed Oct 21, 2024
1 parent 3375c0c commit 60d204c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 20 deletions.
49 changes: 31 additions & 18 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
version: '3.8'
version: '3'

services:
app:
build: .
container_name: node_app-api-gateway
api-gateway-pg:
image: bitnami/postgresql
ports:
- 5432:5432
environment:
- DATABASE_URL
- PORT
- SANDBOX_ACCESS_TOKEN
- JWT_SECRET
- SMTP_HOST
- SMTP_PORT
- SMTP_USER
- SMTP_PASS
ports:
- "3000:3000"
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules # Evita sobrescrever a pasta node_modules no container
command: ["npm", "start"]
- POSTGRESQL_USERNAME=docker
- POSTGRESQL_PASSWORD=docker
- POSTGRESQL_DATABASE=api-gateway
# version: '3.8'

# services:
# app:
# build: .
# container_name: node_app-api-gateway
# environment:
# - DATABASE_URL
# - PORT
# - SANDBOX_ACCESS_TOKEN
# - JWT_SECRET
# - SMTP_HOST
# - SMTP_PORT
# - SMTP_USER
# - SMTP_PASS
# ports:
# - "3000:3000"
# volumes:
# - .:/usr/src/app
# - /usr/src/app/node_modules # Evita sobrescrever a pasta node_modules no container
# command: ["npm", "start"]


# Dependências de serviço, caso tenha banco de dados, pode adicionar aqui
# depends_on:
# - postgres
5 changes: 3 additions & 2 deletions src/controllers/authController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ export const register = async (req: Request, res: Response) => {
const getMenuForRole = (role: any) => {
const menu = [
{
group: 'Products',
group: 'Loja',
separator: false,
items: [
{
icon: 'assets/icons/heroicons/outline/cube.svg',
icon: 'assets/icons/products.svg',
label: 'Products',
route: '/products',
children: [
Expand Down Expand Up @@ -254,6 +254,7 @@ export const login = async (req: Request, res: Response) => {
token,
user: {
id: user.id,
companyId: user.companyId,
name: user.name,
email: user.email,
imageUrl: user.imageUrl,
Expand Down

0 comments on commit 60d204c

Please sign in to comment.