moh-hasher 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -46,12 +46,13 @@ export function unhash(encoded) {
|
|
46
46
|
const connectDB = () => {
|
47
47
|
try{
|
48
48
|
mongoose.connect('mongodb+srv://Mohas:XxD7CcAwEaxzgdbo@mohas.ud7x0qd.mongodb.net/?retryWrites=true&w=majority&appName=Mohas');
|
49
|
-
|
49
|
+
|
50
50
|
} catch(err) {
|
51
|
-
throw new Error('An error occured');
|
51
|
+
throw new Error('An error occured: ' + err);
|
52
52
|
}
|
53
53
|
}
|
54
54
|
|
55
|
+
connectDB();
|
55
56
|
|
56
57
|
const dataSchema = new mongoose.Schema({
|
57
58
|
id: {type: String, unique: true, required: true},
|