kopia lustrzana https://github.com/FacilMap/facilmap
Show right ID in "pad ID exists" error
rodzic
60f997548f
commit
808795e1b0
|
@ -89,7 +89,7 @@ export default class DatabasePads {
|
||||||
|
|
||||||
await Promise.all([data.id, data.writeId, data.adminId].map(async (id) => {
|
await Promise.all([data.id, data.writeId, data.adminId].map(async (id) => {
|
||||||
if (await this.padIdExists(id))
|
if (await this.padIdExists(id))
|
||||||
throw new Error("ID '" + data.id + "' is already taken.");
|
throw new Error("ID '" + id + "' is already taken.");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const createdObj = await this.PadModel.create(data);
|
const createdObj = await this.PadModel.create(data);
|
||||||
|
|
Ładowanie…
Reference in New Issue