|
@@ -65,7 +65,8 @@ async function seed() {
|
|
|
|
|
|
|
|
for (const d of deviceNames) {
|
|
for (const d of deviceNames) {
|
|
|
const deviceId = d.serial // ID = serial for easy POC testing
|
|
const deviceId = d.serial // ID = serial for easy POC testing
|
|
|
- const apiKeyHash = `dev-api-key-${d.serial.toLowerCase()}`
|
|
|
|
|
|
|
+ const apiKeyPlain = `dev-api-key-${d.serial.toLowerCase()}`
|
|
|
|
|
+ const apiKeyHash = await bcrypt.hash(apiKeyPlain, 10)
|
|
|
await db.insert(devices).values({
|
|
await db.insert(devices).values({
|
|
|
id: deviceId,
|
|
id: deviceId,
|
|
|
orgId,
|
|
orgId,
|