From 62a04de4c0fa569bf88ac4571ac55b858ba12532 Mon Sep 17 00:00:00 2001
From: Yannis Barlas <yannisbarlas@gmail.com>
Date: Tue, 13 Apr 2021 02:28:08 +0300
Subject: [PATCH] feat(server): add uuid helper

---
 package.json | 1 +
 src/index.js | 2 ++
 yarn.lock    | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 55720c5..8ed79d7 100644
--- a/package.json
+++ b/package.json
@@ -45,6 +45,7 @@
     "passport": "^0.4.1",
     "pubsweet": "^5.1.25",
     "pubsweet-server": "^13.12.5",
+    "uuid": "^8.3.2",
     "waait": "^1.0.5"
   },
   "devDependencies": {
diff --git a/src/index.js b/src/index.js
index 70f6e2b..bfc94dd 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,4 +1,5 @@
 const cron = require('node-cron')
+const { v4: uuid } = require('uuid')
 
 const BaseModel = require('@pubsweet/base-model')
 const authentication = require('pubsweet-server/src/authentication')
@@ -27,6 +28,7 @@ module.exports = {
   useTransaction,
 
   cron,
+  uuid,
 
   boss,
   connectToJobQueue,
diff --git a/yarn.lock b/yarn.lock
index 730c3f8..5245071 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6867,7 +6867,7 @@ promise-inflight@^1.0.1:
   resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3"
   integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM=
 
-"prompt@github:flatiron/prompt#1c95d1d8d333b5fbc13fa5f0619f3dcf0d514f87":
+prompt@flatiron/prompt#1c95d1d8d333b5fbc13fa5f0619f3dcf0d514f87:
   version "1.0.0"
   resolved "https://codeload.github.com/flatiron/prompt/tar.gz/1c95d1d8d333b5fbc13fa5f0619f3dcf0d514f87"
   dependencies:
-- 
GitLab