Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
publics
service-sdk-releases
Commits
cc7a4a7f
Commit
cc7a4a7f
authored
Oct 31, 2018
by
Pavel Leshkovich
Browse files
Merge branch 'push_notification' into 'master'
Push notification See merge request
!1
parents
63c8dae9
b8ce8eb9
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/createTables.js
View file @
cc7a4a7f
...
...
@@ -41,6 +41,19 @@ function * createTables() {
);
}
try
{
yield
this
.
db
.
queryAsync
(
`
ALTER TABLE
\`
${
this
.
tablesNames
.
PROJECTS
}
\`
ADD
\`
instance_id
\`
CHAR(36)
`
);
}
catch
(
e
)
{
this
.
logger
.
log
(
__filename
,
'
instance_id column already exist
'
);
}
this
.
logger
.
log
(
__filename
,
'
tables created successfully
'
...
...
router/project.js
View file @
cc7a4a7f
...
...
@@ -8,7 +8,8 @@ function* post() {
.
isLength
(
1
,
255
).
value
,
config
:
this
.
checkBody
(
'
config
'
).
eq
(
'
[object Object]
'
).
value
,
feed_uuid
:
this
.
checkBody
(
'
feed_uuid
'
).
isUUID
().
value
,
project_id
:
this
.
checkBody
(
'
project_id
'
).
isInt
().
value
project_id
:
this
.
checkBody
(
'
project_id
'
).
isInt
().
value
,
instance_id
:
this
.
checkParams
(
'
instanceId
'
).
isUUID
().
value
};
const
str
=
JSON
.
stringify
(
project
);
...
...
@@ -25,8 +26,8 @@ function* post() {
yield
this
.
db
.
queryAsync
(
`UPDATE
\`
${
this
.
tablesNames
.
PROJECTS
}
\`
SET name = ?, feed_uuid = ?, project_id = ?, config = ? WHERE id = ?`
,
[
project
.
name
,
project
.
feed_uuid
,
project
.
project_id
,
project
.
config
,
project
.
id
]
}
\`
SET name = ?, feed_uuid = ?, project_id = ?, config =
?, instance_id =
? WHERE id = ?`
,
[
project
.
name
,
project
.
feed_uuid
,
project
.
project_id
,
project
.
config
,
project
.
instance_id
,
project
.
id
]
);
this
.
logger
.
log
(
...
...
Write
Preview
Supports
Markdown
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