pass needed param
This commit is contained in:
parent
74235a1a31
commit
380573e160
1 changed files with 4 additions and 3 deletions
|
|
@ -1565,6 +1565,7 @@ module.exports = async (
|
||||||
|
|
||||||
const GunEvent = require('../services/gunDB/event-constants')
|
const GunEvent = require('../services/gunDB/event-constants')
|
||||||
const Events = require('../services/gunDB/contact-api/events')
|
const Events = require('../services/gunDB/contact-api/events')
|
||||||
|
const user = require('../services/gunDB/Mediator').getUser()
|
||||||
|
|
||||||
app.get(`/api/gun/${GunEvent.ON_RECEIVED_REQUESTS}`, (_, res) => {
|
app.get(`/api/gun/${GunEvent.ON_RECEIVED_REQUESTS}`, (_, res) => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -1614,7 +1615,7 @@ module.exports = async (
|
||||||
app.get(`/api/gun/${GunEvent.ON_AVATAR}`, (_, res) => {
|
app.get(`/api/gun/${GunEvent.ON_AVATAR}`, (_, res) => {
|
||||||
try {
|
try {
|
||||||
// spinup
|
// spinup
|
||||||
Events.onAvatar(() => {})()
|
Events.onAvatar(() => {}, user )()
|
||||||
const data = Events.getAvatar()
|
const data = Events.getAvatar()
|
||||||
res.json({
|
res.json({
|
||||||
data
|
data
|
||||||
|
|
@ -1629,7 +1630,7 @@ module.exports = async (
|
||||||
app.get(`/api/gun/${GunEvent.ON_DISPLAY_NAME}`, (_, res) => {
|
app.get(`/api/gun/${GunEvent.ON_DISPLAY_NAME}`, (_, res) => {
|
||||||
try {
|
try {
|
||||||
// spinup
|
// spinup
|
||||||
Events.onDisplayName(() => {})()
|
Events.onDisplayName(() => {}, user)()
|
||||||
const data = Events.getDisplayName()
|
const data = Events.getDisplayName()
|
||||||
res.json({
|
res.json({
|
||||||
data
|
data
|
||||||
|
|
@ -1644,7 +1645,7 @@ module.exports = async (
|
||||||
app.get(`/api/gun/${GunEvent.ON_HANDSHAKE_ADDRESS}`, (_, res) => {
|
app.get(`/api/gun/${GunEvent.ON_HANDSHAKE_ADDRESS}`, (_, res) => {
|
||||||
try {
|
try {
|
||||||
// spinup
|
// spinup
|
||||||
Events.onCurrentHandshakeAddress(() => {})()
|
Events.onCurrentHandshakeAddress(() => {}, user)()
|
||||||
const data = Events.getHandshakeAddress()
|
const data = Events.getHandshakeAddress()
|
||||||
res.json({
|
res.json({
|
||||||
data
|
data
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue