backend: add return type to getAntennas

This commit is contained in:
Norm 2022-11-16 19:44:20 -05:00
parent 848b9bcdf1
commit 629b865789
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE

View file

@ -5,7 +5,7 @@ import { subscriber } from '@/db/redis.js';
let antennasFetched = false; let antennasFetched = false;
let antennas: Antenna[] = []; let antennas: Antenna[] = [];
export async function getAntennas() { export async function getAntennas(): Promise<Antenna[]> {
if (!antennasFetched) { if (!antennasFetched) {
antennas = await Antennas.find(); antennas = await Antennas.find();
antennasFetched = true; antennasFetched = true;