mirror of
https://github.com/eliasrenman/gardentron.git
synced 2026-03-16 20:46:07 +01:00
added get all event
This commit is contained in:
@@ -32,4 +32,18 @@ export class MoistureSocket extends SocketHandler {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
public getAllMoistures() {
|
||||
return prisma.moistureValue.findMany({
|
||||
orderBy: {
|
||||
createdAt: "desc",
|
||||
},
|
||||
select: {
|
||||
createdAt: true,
|
||||
id: true,
|
||||
name: true,
|
||||
value: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user