Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Unike
/
UnikeInspection-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8bbe41f2
authored
Apr 23, 2025
by
Augusto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server settings
parent
7fe4d144
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
1 deletions
+72
-1
ecosystem.config.js
+27
-0
src/modules/auth/dto/login.dto.ts
+1
-1
src/modules/sites/dto/site-response.dto.ts
+28
-0
src/modules/sites/sites.controller.ts
+16
-0
No files found.
ecosystem.config.js
0 → 100644
View file @
8bbe41f2
module
.
exports
=
{
apps
:
[
{
name
:
'Cellnex API'
,
script
:
'src/main.js'
,
instances
:
1
,
exec_mode
:
'fork'
,
autorestart
:
true
,
watch
:
false
,
max_memory_restart
:
'1G'
,
env
:
{
NODE_ENV
:
'production'
,
PORT
:
3905
,
DATABASE_URL
:
process
.
env
.
DATABASE_URL
,
JWT_SECRET
:
process
.
env
.
JWT_SECRET
,
},
error_file
:
'logs/err.log'
,
out_file
:
'logs/out.log'
,
log_date_format
:
'YYYY-MM-DD HH:mm:ss Z'
,
time
:
true
,
min_uptime
:
'60s'
,
max_restarts
:
5
,
restart_delay
:
3000
,
node_args
:
'--max-old-space-size=1024'
,
},
],
};
src/modules/auth/dto/login.dto.ts
View file @
8bbe41f2
...
...
@@ -12,7 +12,7 @@ export class LoginDto {
@
ApiProperty
({
description
:
'The password of the user'
,
example
:
'
brandit123465
'
,
example
:
'
passsword
'
,
})
@
IsString
()
@
IsNotEmpty
()
...
...
src/modules/sites/dto/site-response.dto.ts
0 → 100644
View file @
8bbe41f2
import
{
ApiProperty
}
from
'@nestjs/swagger'
;
export
class
SiteResponseDto
{
@
ApiProperty
({
description
:
'Site ID'
})
id
:
number
;
@
ApiProperty
({
description
:
'Site code'
})
code
:
string
;
@
ApiProperty
({
description
:
'Site name'
})
name
:
string
;
@
ApiProperty
({
description
:
'Latitude coordinate'
})
latitude
:
number
;
@
ApiProperty
({
description
:
'Longitude coordinate'
})
longitude
:
number
;
@
ApiProperty
({
description
:
'Address of the site'
})
address
:
string
;
@
ApiProperty
({
description
:
'Creation timestamp'
})
createdAt
:
Date
;
@
ApiProperty
({
description
:
'Last update timestamp'
})
updatedAt
:
Date
;
}
\ No newline at end of file
src/modules/sites/sites.controller.ts
View file @
8bbe41f2
...
...
@@ -83,6 +83,22 @@ export class SitesController {
@
ApiResponse
({
status
:
200
,
description
:
'Return the site with its candidates.'
,
schema
:
{
properties
:
{
data
:
{
type
:
'object'
,
properties
:
{
id
:
{
type
:
'number'
},
code
:
{
type
:
'string'
},
name
:
{
type
:
'string'
},
candidates
:
{
type
:
'array'
,
items
:
{
$ref
:
'#/components/schemas/CandidateResponseDto'
}
}
}
}
}
}
})
@
ApiResponse
({
status
:
404
,
description
:
'Site not found.'
})
findOneWithCandidates
(@
Param
(
'id'
,
ParseIntPipe
)
id
:
number
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment