Explorar o código

hapus unique user di model sanksi

yazid138 %!s(int64=3) %!d(string=hai) anos
pai
achega
01e3f0eec5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      model/sanksi.model.js

+ 1 - 1
model/sanksi.model.js

@@ -11,7 +11,7 @@ module.exports = mongoose.model(
     {
       no_sanksi: String,
       laporan: { type: Types.ObjectId, unique: true, ref: laporan },
-      user: { type: Types.ObjectId, unique: true, ref: user },
+      user: { type: Types.ObjectId, ref: user },
       pelanggaran: [{ type: Types.ObjectId, ref: pelanggaran }],
       keterangan: String,
       aktif: { type: Boolean, default: true },