mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 03:03:07 +02:00
lint
This commit is contained in:
parent
408142647c
commit
4a64280a7c
306 changed files with 306 additions and 0 deletions
|
@ -110,6 +110,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const query = makePaginationQuery(AbuseUserReports.createQueryBuilder('report'), ps.sinceId, ps.untilId);
|
const query = makePaginationQuery(AbuseUserReports.createQueryBuilder('report'), ps.sinceId, ps.untilId);
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, _me) => {
|
export default define(meta, async (ps, _me) => {
|
||||||
const me = _me ? await Users.findOneOrFail(_me.id) : null;
|
const me = _me ? await Users.findOneOrFail(_me.id) : null;
|
||||||
const noUsers = (await Users.count({
|
const noUsers = (await Users.count({
|
||||||
|
|
|
@ -19,6 +19,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const user = await Users.findOne(ps.userId);
|
const user = await Users.findOne(ps.userId);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
await Ads.insert({
|
await Ads.insert({
|
||||||
id: genId(),
|
id: genId(),
|
||||||
|
|
|
@ -25,6 +25,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const ad = await Ads.findOne(ps.id);
|
const ad = await Ads.findOne(ps.id);
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const query = makePaginationQuery(Ads.createQueryBuilder('ad'), ps.sinceId, ps.untilId)
|
const query = makePaginationQuery(Ads.createQueryBuilder('ad'), ps.sinceId, ps.untilId)
|
||||||
.andWhere('ad.expiresAt > :now', { now: new Date() });
|
.andWhere('ad.expiresAt > :now', { now: new Date() });
|
||||||
|
|
|
@ -46,6 +46,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const ad = await Ads.findOne(ps.id);
|
const ad = await Ads.findOne(ps.id);
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const announcement = await Announcements.save({
|
const announcement = await Announcements.save({
|
||||||
id: genId(),
|
id: genId(),
|
||||||
|
|
|
@ -25,6 +25,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const announcement = await Announcements.findOne(ps.id);
|
const announcement = await Announcements.findOne(ps.id);
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const query = makePaginationQuery(Announcements.createQueryBuilder('announcement'), ps.sinceId, ps.untilId);
|
const query = makePaginationQuery(Announcements.createQueryBuilder('announcement'), ps.sinceId, ps.untilId);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const announcement = await Announcements.findOne(ps.id);
|
const announcement = await Announcements.findOne(ps.id);
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const files = await DriveFiles.find({
|
const files = await DriveFiles.find({
|
||||||
userId: ps.userId,
|
userId: ps.userId,
|
||||||
|
|
|
@ -8,6 +8,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
await Logs.clear(); // TRUNCATE
|
await Logs.clear(); // TRUNCATE
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,6 +8,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
createCleanRemoteFilesJob();
|
createCleanRemoteFilesJob();
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,6 +10,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const files = await DriveFiles.find({
|
const files = await DriveFiles.find({
|
||||||
userId: IsNull(),
|
userId: IsNull(),
|
||||||
|
|
|
@ -54,6 +54,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const query = makePaginationQuery(DriveFiles.createQueryBuilder('file'), ps.sinceId, ps.untilId);
|
const query = makePaginationQuery(DriveFiles.createQueryBuilder('file'), ps.sinceId, ps.untilId);
|
||||||
|
|
||||||
|
|
|
@ -161,6 +161,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const file = ps.fileId ? await DriveFiles.findOne(ps.fileId) : await DriveFiles.findOne({
|
const file = ps.fileId ? await DriveFiles.findOne(ps.fileId) : await DriveFiles.findOne({
|
||||||
where: [{
|
where: [{
|
||||||
|
|
|
@ -30,6 +30,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const file = await DriveFiles.findOne(ps.fileId);
|
const file = await DriveFiles.findOne(ps.fileId);
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const emoji = await Emojis.findOne(ps.emojiId);
|
const emoji = await Emojis.findOne(ps.emojiId);
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const q = makePaginationQuery(Emojis.createQueryBuilder('emoji'), ps.sinceId, ps.untilId);
|
const q = makePaginationQuery(Emojis.createQueryBuilder('emoji'), ps.sinceId, ps.untilId);
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const q = makePaginationQuery(Emojis.createQueryBuilder('emoji'), ps.sinceId, ps.untilId)
|
const q = makePaginationQuery(Emojis.createQueryBuilder('emoji'), ps.sinceId, ps.untilId)
|
||||||
.andWhere(`emoji.host IS NULL`);
|
.andWhere(`emoji.host IS NULL`);
|
||||||
|
|
|
@ -27,6 +27,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const emoji = await Emojis.findOne(ps.id);
|
const emoji = await Emojis.findOne(ps.id);
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const emoji = await Emojis.findOne(ps.id);
|
const emoji = await Emojis.findOne(ps.id);
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const files = await DriveFiles.find({
|
const files = await DriveFiles.find({
|
||||||
userHost: ps.host,
|
userHost: ps.host,
|
||||||
|
|
|
@ -17,6 +17,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const instance = await Instances.findOne({ host: toPuny(ps.host) });
|
const instance = await Instances.findOne({ host: toPuny(ps.host) });
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const followings = await Followings.find({
|
const followings = await Followings.find({
|
||||||
followerHost: ps.host,
|
followerHost: ps.host,
|
||||||
|
|
|
@ -20,6 +20,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const instance = await Instances.findOne({ host: toPuny(ps.host) });
|
const instance = await Instances.findOne({ host: toPuny(ps.host) });
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async () => {
|
export default define(meta, async () => {
|
||||||
const stats = await
|
const stats = await
|
||||||
getConnection().query(`SELECT * FROM pg_indexes;`)
|
getConnection().query(`SELECT * FROM pg_indexes;`)
|
||||||
|
|
|
@ -22,6 +22,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async () => {
|
export default define(meta, async () => {
|
||||||
const sizes = await
|
const sizes = await
|
||||||
getConnection().query(`
|
getConnection().query(`
|
||||||
|
|
|
@ -26,6 +26,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async () => {
|
export default define(meta, async () => {
|
||||||
const code = rndstr({
|
const code = rndstr({
|
||||||
length: 8,
|
length: 8,
|
||||||
|
|
|
@ -16,6 +16,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const user = await Users.findOne(ps.userId as string);
|
const user = await Users.findOne(ps.userId as string);
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const user = await Users.findOne(ps.userId as string);
|
const user = await Users.findOne(ps.userId as string);
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const note = await getNote(ps.noteId).catch(e => {
|
const note = await getNote(ps.noteId).catch(e => {
|
||||||
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
if (e.id === '9725d0ce-ba28-4dde-95a7-2cbb2c15de24') throw new ApiError(meta.errors.noSuchNote);
|
||||||
|
|
|
@ -11,6 +11,7 @@ export const meta = {
|
||||||
params: {},
|
params: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
destroy();
|
destroy();
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const jobs = await deliverQueue.getJobs(['delayed']);
|
const jobs = await deliverQueue.getJobs(['delayed']);
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const jobs = await inboxQueue.getJobs(['delayed']);
|
const jobs = await inboxQueue.getJobs(['delayed']);
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const queue =
|
const queue =
|
||||||
ps.domain === 'deliver' ? deliverQueue :
|
ps.domain === 'deliver' ? deliverQueue :
|
||||||
|
|
|
@ -29,6 +29,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const deliverJobCounts = await deliverQueue.getJobCounts();
|
const deliverJobCounts = await deliverQueue.getJobCounts();
|
||||||
const inboxJobCounts = await inboxQueue.getJobCounts();
|
const inboxJobCounts = await inboxQueue.getJobCounts();
|
||||||
|
|
|
@ -52,6 +52,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
try {
|
try {
|
||||||
if (new URL(ps.inbox).protocol !== 'https:') throw 'https only';
|
if (new URL(ps.inbox).protocol !== 'https:') throw 'https only';
|
||||||
|
|
|
@ -42,6 +42,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
return await listRelay();
|
return await listRelay();
|
||||||
});
|
});
|
||||||
|
|
|
@ -15,6 +15,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
return await removeRelay(ps.inbox);
|
return await removeRelay(ps.inbox);
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,6 +31,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const user = await Users.findOne(ps.userId as string);
|
const user = await Users.findOne(ps.userId as string);
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const report = await AbuseUserReports.findOne(ps.reportId);
|
const report = await AbuseUserReports.findOne(ps.reportId);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ export const meta = {
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
insertModerationLog(me, 'chartResync');
|
insertModerationLog(me, 'chartResync');
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
await sendEmail(ps.to, ps.subject, ps.text, ps.text);
|
await sendEmail(ps.to, ps.subject, ps.text, ps.text);
|
||||||
});
|
});
|
||||||
|
|
|
@ -90,6 +90,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async () => {
|
export default define(meta, async () => {
|
||||||
const memStats = await si.mem();
|
const memStats = await si.mem();
|
||||||
const fsStats = await si.fsSize();
|
const fsStats = await si.fsSize();
|
||||||
|
|
|
@ -65,6 +65,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const query = makePaginationQuery(ModerationLogs.createQueryBuilder('report'), ps.sinceId, ps.untilId);
|
const query = makePaginationQuery(ModerationLogs.createQueryBuilder('report'), ps.sinceId, ps.untilId);
|
||||||
|
|
||||||
|
|
|
@ -159,6 +159,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const user = await Users.findOne(ps.userId as string);
|
const user = await Users.findOne(ps.userId as string);
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const query = Users.createQueryBuilder('user');
|
const query = Users.createQueryBuilder('user');
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const user = await Users.findOne(ps.userId as string);
|
const user = await Users.findOne(ps.userId as string);
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const user = await Users.findOne(ps.userId as string);
|
const user = await Users.findOne(ps.userId as string);
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const user = await Users.findOne(ps.userId as string);
|
const user = await Users.findOne(ps.userId as string);
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const user = await Users.findOne(ps.userId as string);
|
const user = await Users.findOne(ps.userId as string);
|
||||||
|
|
||||||
|
|
|
@ -299,6 +299,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const set = {} as Partial<Meta>;
|
const set = {} as Partial<Meta>;
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const params: string[] = [];
|
const params: string[] = [];
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const query = makePaginationQuery(Announcements.createQueryBuilder('announcement'), ps.sinceId, ps.untilId);
|
const query = makePaginationQuery(Announcements.createQueryBuilder('announcement'), ps.sinceId, ps.untilId);
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
let userList;
|
let userList;
|
||||||
let userGroupJoining;
|
let userGroupJoining;
|
||||||
|
|
|
@ -27,6 +27,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const antenna = await Antennas.findOne({
|
const antenna = await Antennas.findOne({
|
||||||
id: ps.antennaId,
|
id: ps.antennaId,
|
||||||
|
|
|
@ -19,6 +19,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const antennas = await Antennas.find({
|
const antennas = await Antennas.find({
|
||||||
userId: me.id,
|
userId: me.id,
|
||||||
|
|
|
@ -62,6 +62,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const antenna = await Antennas.findOne({
|
const antenna = await Antennas.findOne({
|
||||||
id: ps.antennaId,
|
id: ps.antennaId,
|
||||||
|
|
|
@ -32,6 +32,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
// Fetch the antenna
|
// Fetch the antenna
|
||||||
const antenna = await Antennas.findOne({
|
const antenna = await Antennas.findOne({
|
||||||
|
|
|
@ -89,6 +89,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
// Fetch the antenna
|
// Fetch the antenna
|
||||||
const antenna = await Antennas.findOne({
|
const antenna = await Antennas.findOne({
|
||||||
|
|
|
@ -29,6 +29,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const resolver = new Resolver();
|
const resolver = new Resolver();
|
||||||
const object = await resolver.resolve(ps.uri);
|
const object = await resolver.resolve(ps.uri);
|
||||||
|
|
|
@ -54,6 +54,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
const object = await fetchAny(ps.uri);
|
const object = await fetchAny(ps.uri);
|
||||||
if (object) {
|
if (object) {
|
||||||
|
|
|
@ -37,6 +37,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
// Generate secret
|
// Generate secret
|
||||||
const secret = secureRndstr(32, true);
|
const secret = secureRndstr(32, true);
|
||||||
|
|
|
@ -34,6 +34,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user, token) => {
|
export default define(meta, async (ps, user, token) => {
|
||||||
const isSecure = user != null && token == null;
|
const isSecure = user != null && token == null;
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
// Fetch token
|
// Fetch token
|
||||||
const session = await AuthSessions
|
const session = await AuthSessions
|
||||||
|
|
|
@ -42,6 +42,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
// Lookup app
|
// Lookup app
|
||||||
const app = await Apps.findOne({
|
const app = await Apps.findOne({
|
||||||
|
|
|
@ -44,6 +44,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
// Lookup session
|
// Lookup session
|
||||||
const session = await AuthSessions.findOne({
|
const session = await AuthSessions.findOne({
|
||||||
|
|
|
@ -56,6 +56,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
// Lookup app
|
// Lookup app
|
||||||
const app = await Apps.findOne({
|
const app = await Apps.findOne({
|
||||||
|
|
|
@ -52,6 +52,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const blocker = await Users.findOneOrFail(user.id);
|
const blocker = await Users.findOneOrFail(user.id);
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const blocker = await Users.findOneOrFail(user.id);
|
const blocker = await Users.findOneOrFail(user.id);
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const query = makePaginationQuery(Blockings.createQueryBuilder('blocking'), ps.sinceId, ps.untilId)
|
const query = makePaginationQuery(Blockings.createQueryBuilder('blocking'), ps.sinceId, ps.untilId)
|
||||||
.andWhere(`blocking.blockerId = :meId`, { meId: me.id });
|
.andWhere(`blocking.blockerId = :meId`, { meId: me.id });
|
||||||
|
|
|
@ -42,6 +42,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
let banner = null;
|
let banner = null;
|
||||||
if (ps.bannerId != null) {
|
if (ps.bannerId != null) {
|
||||||
|
|
|
@ -17,6 +17,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const query = Channels.createQueryBuilder('channel')
|
const query = Channels.createQueryBuilder('channel')
|
||||||
.where('channel.lastNotedAt IS NOT NULL')
|
.where('channel.lastNotedAt IS NOT NULL')
|
||||||
|
|
|
@ -28,6 +28,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const channel = await Channels.findOne({
|
const channel = await Channels.findOne({
|
||||||
id: ps.channelId,
|
id: ps.channelId,
|
||||||
|
|
|
@ -37,6 +37,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const query = makePaginationQuery(ChannelFollowings.createQueryBuilder(), ps.sinceId, ps.untilId)
|
const query = makePaginationQuery(ChannelFollowings.createQueryBuilder(), ps.sinceId, ps.untilId)
|
||||||
.andWhere({ followerId: me.id });
|
.andWhere({ followerId: me.id });
|
||||||
|
|
|
@ -37,6 +37,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const query = makePaginationQuery(Channels.createQueryBuilder(), ps.sinceId, ps.untilId)
|
const query = makePaginationQuery(Channels.createQueryBuilder(), ps.sinceId, ps.untilId)
|
||||||
.andWhere({ userId: me.id });
|
.andWhere({ userId: me.id });
|
||||||
|
|
|
@ -30,6 +30,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const channel = await Channels.findOne({
|
const channel = await Channels.findOne({
|
||||||
id: ps.channelId,
|
id: ps.channelId,
|
||||||
|
|
|
@ -57,6 +57,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const channel = await Channels.findOne({
|
const channel = await Channels.findOne({
|
||||||
id: ps.channelId,
|
id: ps.channelId,
|
||||||
|
|
|
@ -27,6 +27,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const channel = await Channels.findOne({
|
const channel = await Channels.findOne({
|
||||||
id: ps.channelId,
|
id: ps.channelId,
|
||||||
|
|
|
@ -56,6 +56,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const channel = await Channels.findOne({
|
const channel = await Channels.findOne({
|
||||||
id: ps.channelId,
|
id: ps.channelId,
|
||||||
|
|
|
@ -25,6 +25,7 @@ export const meta = {
|
||||||
res: convertLog(activeUsersChart.schema),
|
res: convertLog(activeUsersChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await activeUsersChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
return await activeUsersChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||||
});
|
});
|
||||||
|
|
|
@ -25,6 +25,7 @@ export const meta = {
|
||||||
res: convertLog(driveChart.schema),
|
res: convertLog(driveChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await driveChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
return await driveChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||||
});
|
});
|
||||||
|
|
|
@ -25,6 +25,7 @@ export const meta = {
|
||||||
res: convertLog(federationChart.schema),
|
res: convertLog(federationChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await federationChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
return await federationChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||||
});
|
});
|
||||||
|
|
|
@ -29,6 +29,7 @@ export const meta = {
|
||||||
res: convertLog(hashtagChart.schema),
|
res: convertLog(hashtagChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await hashtagChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.tag);
|
return await hashtagChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.tag);
|
||||||
});
|
});
|
||||||
|
|
|
@ -29,6 +29,7 @@ export const meta = {
|
||||||
res: convertLog(instanceChart.schema),
|
res: convertLog(instanceChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await instanceChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.host);
|
return await instanceChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.host);
|
||||||
});
|
});
|
||||||
|
|
|
@ -25,6 +25,7 @@ export const meta = {
|
||||||
res: convertLog(networkChart.schema),
|
res: convertLog(networkChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await networkChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
return await networkChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||||
});
|
});
|
||||||
|
|
|
@ -25,6 +25,7 @@ export const meta = {
|
||||||
res: convertLog(notesChart.schema),
|
res: convertLog(notesChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await notesChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
return await notesChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,6 +30,7 @@ export const meta = {
|
||||||
res: convertLog(perUserDriveChart.schema),
|
res: convertLog(perUserDriveChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await perUserDriveChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
return await perUserDriveChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,6 +30,7 @@ export const meta = {
|
||||||
res: convertLog(perUserFollowingChart.schema),
|
res: convertLog(perUserFollowingChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await perUserFollowingChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
return await perUserFollowingChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,6 +30,7 @@ export const meta = {
|
||||||
res: convertLog(perUserNotesChart.schema),
|
res: convertLog(perUserNotesChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await perUserNotesChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
return await perUserNotesChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,6 +30,7 @@ export const meta = {
|
||||||
res: convertLog(perUserReactionsChart.schema),
|
res: convertLog(perUserReactionsChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await perUserReactionsChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
return await perUserReactionsChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null, ps.userId);
|
||||||
});
|
});
|
||||||
|
|
|
@ -25,6 +25,7 @@ export const meta = {
|
||||||
res: convertLog(usersChart.schema),
|
res: convertLog(usersChart.schema),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps) => {
|
export default define(meta, async (ps) => {
|
||||||
return await usersChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
return await usersChart.getChart(ps.span as any, ps.limit!, ps.offset ? new Date(ps.offset) : null);
|
||||||
});
|
});
|
||||||
|
|
|
@ -44,6 +44,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const clip = await Clips.findOne({
|
const clip = await Clips.findOne({
|
||||||
id: ps.clipId,
|
id: ps.clipId,
|
||||||
|
|
|
@ -31,6 +31,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const clip = await Clips.insert({
|
const clip = await Clips.insert({
|
||||||
id: genId(),
|
id: genId(),
|
||||||
|
|
|
@ -26,6 +26,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const clip = await Clips.findOne({
|
const clip = await Clips.findOne({
|
||||||
id: ps.clipId,
|
id: ps.clipId,
|
||||||
|
|
|
@ -19,6 +19,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
const clips = await Clips.find({
|
const clips = await Clips.find({
|
||||||
userId: me.id,
|
userId: me.id,
|
||||||
|
|
|
@ -53,6 +53,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, user) => {
|
export default define(meta, async (ps, user) => {
|
||||||
const clip = await Clips.findOne({
|
const clip = await Clips.findOne({
|
||||||
id: ps.clipId,
|
id: ps.clipId,
|
||||||
|
|
|
@ -32,6 +32,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, async (ps, me) => {
|
export default define(meta, async (ps, me) => {
|
||||||
// Fetch the clip
|
// Fetch the clip
|
||||||
const clip = await Clips.findOne({
|
const clip = await Clips.findOne({
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue