revert the shit i did when i started the other way around
This commit is contained in:
parent
966d951490
commit
54cb13d1e5
3 changed files with 31 additions and 39 deletions
|
|
@ -1,7 +1,4 @@
|
|||
const profileServiceProvider = require('../services/profileService');
|
||||
const ContactDetailsSet = require('../models/ContactDetailsSet');
|
||||
const NymSet = require('../models/NymSet');
|
||||
const profileService = profileServiceProvider(ContactDetailsSet, NymSet);
|
||||
const profileService = require('../services/profileService');
|
||||
|
||||
async function redirectIfMissingProfileDetailsMiddleware(req, res, next) {
|
||||
const publicKey = req.cookies.publicKey;
|
||||
|
|
|
|||
|
|
@ -4,14 +4,10 @@ const invitesService = require('../services/invitesService');
|
|||
const nostrService = require('../services/nostrService');
|
||||
const loginService = require('../services/loginService');
|
||||
const sessionService = require('../services/sessionService');
|
||||
const profileServiceProvider = require('../services/profileService');
|
||||
const profileService = require('../services/profileService');
|
||||
const offerService = require('../services/offerService');
|
||||
const errors = require('../errors');
|
||||
|
||||
const ContactDetailsSet = require('../models/ContactDetailsSet');
|
||||
const NymSet = require('../models/NymSet');
|
||||
const profileService = profileServiceProvider(ContactDetailsSet, NymSet);
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
class ApiRoutesProvider {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
const uuid = require('uuid');
|
||||
const ContactDetailsSet = require('../models/ContactDetailsSet');
|
||||
const NymSet = require('../models/NymSet');
|
||||
|
||||
const profileServicesProvider = (ContactDetailsSet, NymSet) => {
|
||||
async function setContactDetails(publicKey, encryptedContactDetails) {
|
||||
return await ContactDetailsSet.create({
|
||||
uuid: uuid.v7(),
|
||||
|
|
@ -30,6 +31,4 @@ const profileServicesProvider = (ContactDetailsSet, NymSet) => {
|
|||
return isNymSet && areContactDetailsSet;
|
||||
}
|
||||
|
||||
return { setContactDetails, setNym, areProfileDetailsComplete };
|
||||
};
|
||||
module.exports = profileServicesProvider;
|
||||
module.exports = { setContactDetails, setNym, areProfileDetailsComplete };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue