Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
srvpro
Commits
0f10dfcb
Commit
0f10dfcb
authored
Feb 12, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3fe8a7f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
ygopro-server.coffee
ygopro-server.coffee
+6
-0
ygopro-server.js
ygopro-server.js
+6
-0
No files found.
ygopro-server.coffee
View file @
0f10dfcb
...
...
@@ -103,7 +103,13 @@ users_cache = {}
if
settings
.
modules
.
mycard
.
enabled
pgClient
=
require
(
'pg'
).
Client
pg_client
=
new
pgClient
(
settings
.
modules
.
mycard
.
auth_database
)
pg_client
.
on
'error'
,
(
err
)
->
log
.
warn
"PostgreSQL ERROR: "
,
err
return
pg_query
=
pg_client
.
query
(
'SELECT username, id from users'
)
pg_query
.
on
'error'
,
(
err
)
->
log
.
warn
"PostgreSQL Query ERROR: "
,
err
return
pg_query
.
on
'row'
,
(
row
)
->
#log.info "load user", row.username, row.id
users_cache
[
row
.
username
]
=
row
.
id
...
...
ygopro-server.js
View file @
0f10dfcb
...
...
@@ -144,7 +144,13 @@
if
(
settings
.
modules
.
mycard
.
enabled
)
{
pgClient
=
require
(
'
pg
'
).
Client
;
pg_client
=
new
pgClient
(
settings
.
modules
.
mycard
.
auth_database
);
pg_client
.
on
(
'
error
'
,
function
(
err
)
{
log
.
warn
(
"
PostgreSQL ERROR:
"
,
err
);
});
pg_query
=
pg_client
.
query
(
'
SELECT username, id from users
'
);
pg_query
.
on
(
'
error
'
,
function
(
err
)
{
log
.
warn
(
"
PostgreSQL Query ERROR:
"
,
err
);
});
pg_query
.
on
(
'
row
'
,
function
(
row
)
{
users_cache
[
row
.
username
]
=
row
.
id
;
});
...
...
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