@riocrypto/common-server 1.0.660 → 1.0.661
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.
|
@@ -16,8 +16,8 @@ interface BankAccountDoc extends Document {
|
|
|
16
16
|
approved: boolean;
|
|
17
17
|
swiftCode?: string;
|
|
18
18
|
}
|
|
19
|
-
interface
|
|
19
|
+
interface BankAccountModel extends Model<BankAccountDoc> {
|
|
20
20
|
build(attrs: BankAccountAttrs): BankAccountDoc;
|
|
21
21
|
}
|
|
22
|
-
declare const buildBankAccount: (mongoose: Mongoose) =>
|
|
22
|
+
declare const buildBankAccount: (mongoose: Mongoose) => BankAccountModel;
|
|
23
23
|
export { buildBankAccount, BankAccountDoc };
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.buildBankAccount = void 0;
|
|
4
4
|
const buildBankAccount = (mongoose) => {
|
|
5
5
|
// if model is already defined, return it
|
|
6
|
-
if (mongoose.models.
|
|
7
|
-
return mongoose.model("
|
|
6
|
+
if (mongoose.models.BankAccount) {
|
|
7
|
+
return mongoose.model("BankAccount");
|
|
8
8
|
}
|
|
9
9
|
const BankAccountSchema = new mongoose.Schema({
|
|
10
10
|
userId: {
|
|
@@ -40,9 +40,9 @@ const buildBankAccount = (mongoose) => {
|
|
|
40
40
|
},
|
|
41
41
|
});
|
|
42
42
|
BankAccountSchema.statics.build = (attrs) => {
|
|
43
|
-
return new
|
|
43
|
+
return new BankAccount(attrs);
|
|
44
44
|
};
|
|
45
|
-
const
|
|
46
|
-
return
|
|
45
|
+
const BankAccount = mongoose.model("BankAccount", BankAccountSchema);
|
|
46
|
+
return BankAccount;
|
|
47
47
|
};
|
|
48
48
|
exports.buildBankAccount = buildBankAccount;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.661",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
25
25
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
26
26
|
"@google-cloud/storage": "^6.9.5",
|
|
27
|
-
"@riocrypto/common": "^1.0.
|
|
27
|
+
"@riocrypto/common": "^1.0.603",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|