getters as a module
This commit is contained in:
parent
6e6cb9b479
commit
f375ada0c5
1 changed files with 5 additions and 5 deletions
|
|
@ -2,13 +2,13 @@
|
||||||
* @format
|
* @format
|
||||||
*/
|
*/
|
||||||
const Common = require('shock-common')
|
const Common = require('shock-common')
|
||||||
|
const Logger = require('winston')
|
||||||
/**
|
/**
|
||||||
* @typedef {import('shock-common').Schema.Follow} Follow
|
* @typedef {import('shock-common').Schema.Follow} Follow
|
||||||
*/
|
*/
|
||||||
const Logger = require('winston')
|
|
||||||
|
|
||||||
const Key = require('./key')
|
const Key = require('../key')
|
||||||
const Utils = require('./utils')
|
const Utils = require('../utils')
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} pub
|
* @param {string} pub
|
||||||
|
|
@ -34,7 +34,7 @@ exports.currentOrderAddress = async pub => {
|
||||||
* @returns {Promise<string|null>}
|
* @returns {Promise<string|null>}
|
||||||
*/
|
*/
|
||||||
exports.userToIncomingID = async pub => {
|
exports.userToIncomingID = async pub => {
|
||||||
const incomingID = await require('../Mediator')
|
const incomingID = await require('../../Mediator')
|
||||||
.getUser()
|
.getUser()
|
||||||
.get(Key.USER_TO_INCOMING)
|
.get(Key.USER_TO_INCOMING)
|
||||||
.get(pub)
|
.get(pub)
|
||||||
|
|
@ -49,7 +49,7 @@ exports.userToIncomingID = async pub => {
|
||||||
* @returns {Promise<Record<string, Follow>>}
|
* @returns {Promise<Record<string, Follow>>}
|
||||||
*/
|
*/
|
||||||
exports.currentFollows = () => {
|
exports.currentFollows = () => {
|
||||||
const user = require('../Mediator').getUser()
|
const user = require('../../Mediator').getUser()
|
||||||
|
|
||||||
return new Promise(res => {
|
return new Promise(res => {
|
||||||
user.get(Key.FOLLOWS).load(data => {
|
user.get(Key.FOLLOWS).load(data => {
|
||||||
Loading…
Add table
Add a link
Reference in a new issue