feat: added controller for new services

This commit is contained in:
2025-01-11 12:13:34 +01:00
parent 5a5dcb6334
commit 7b9c6ae5b8
6 changed files with 86 additions and 36 deletions

View File

@ -23,21 +23,4 @@ export class WifiLocationHistoryRepository {
public async createMany(data: Partial<WifiLocationHistory>[]) {
return await WifiLocationHistory.bulkCreate(data);
}
public async update(id: string, data: Partial<WifiLocationHistory>) {
const wifiScan = await this.findById(id);
if (wifiScan) {
return await wifiScan.update(data);
}
return null;
}
public async delete(id: string) {
const wifiScan = await this.findById(id);
if (wifiScan) {
await wifiScan.destroy();
return true;
}
return false;
}
}