Added formating.
This commit is contained in:
1 parent
0f298d6450
commit
8fe3ed9bd1
2 files changed
+7
-10
No files matched your search
@@ -12,12 +12,12 @@ const networkInterfaceSchema = mongoose.Schema({
|
|||||||
drop_in: { type: Number, default: 0 },
|
drop_in: { type: Number, default: 0 },
|
||||||
drop_out: { type: Number, default: 0 },
|
drop_out: { type: Number, default: 0 },
|
||||||
fifo_in: { type: Number, default: 0 },
|
fifo_in: { type: Number, default: 0 },
|
||||||
fifo_out: { type: Number, default: 0 }
|
fifo_out: { type: Number, default: 0 },
|
||||||
});
|
});
|
||||||
|
|
||||||
const captureSchema = mongoose.Schema({
|
const captureSchema = mongoose.Schema({
|
||||||
version: { type: String, default: "" },
|
version: { type: String, default: "" },
|
||||||
mode: { type: String, default: "" }
|
mode: { type: String, default: "" },
|
||||||
});
|
});
|
||||||
|
|
||||||
const NetworkCheckSchema = mongoose.Schema(
|
const NetworkCheckSchema = mongoose.Schema(
|
||||||
@@ -25,16 +25,16 @@ const NetworkCheckSchema = mongoose.Schema(
|
|||||||
...BaseCheckSchema.obj,
|
...BaseCheckSchema.obj,
|
||||||
data: {
|
data: {
|
||||||
type: [networkInterfaceSchema],
|
type: [networkInterfaceSchema],
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
capture: {
|
capture: {
|
||||||
type: captureSchema,
|
type: captureSchema,
|
||||||
default: () => ({})
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
errors: {
|
errors: {
|
||||||
type: mongoose.Schema.Types.Mixed,
|
type: mongoose.Schema.Types.Mixed,
|
||||||
default: null
|
default: null,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{ timestamps: true }
|
{ timestamps: true }
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -43,7 +43,4 @@ const getNetworkChecksByMonitorId = async (monitorId, limit = 100) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export { createNetworkCheck, getNetworkChecksByMonitorId };
|
||||||
createNetworkCheck,
|
|
||||||
getNetworkChecksByMonitorId,
|
|
||||||
};
|
|
||||||
Reference in new issue
Block a user