2020-01-29 20:37:25 +01:00
|
|
|
import define from '../../define';
|
|
|
|
import { Antennas } from '../../../../models';
|
|
|
|
|
|
|
|
export const meta = {
|
|
|
|
tags: ['antennas', 'account'],
|
|
|
|
|
2020-02-15 13:33:32 +01:00
|
|
|
requireCredential: true as const,
|
2020-01-29 20:37:25 +01:00
|
|
|
|
|
|
|
kind: 'read:account',
|
|
|
|
};
|
|
|
|
|
|
|
|
export default define(meta, async (ps, me) => {
|
|
|
|
const antennas = await Antennas.find({
|
|
|
|
userId: me.id,
|
|
|
|
});
|
|
|
|
|
|
|
|
return await Promise.all(antennas.map(x => Antennas.pack(x)));
|
|
|
|
});
|