This commit is contained in:
syuilo
2022-01-03 02:12:50 +09:00
parent 408142647c
commit 4a64280a7c
306 changed files with 306 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(Clips.createQueryBuilder('clip'), ps.sinceId, ps.untilId)
.andWhere(`clip.userId = :userId`, { userId: ps.userId })

View File

@@ -63,6 +63,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId != null
? { id: ps.userId }

View File

@@ -63,6 +63,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId != null
? { id: ps.userId }

View File

@@ -27,6 +27,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(GalleryPosts.createQueryBuilder('post'), ps.sinceId, ps.untilId)
.andWhere(`post.userId = :userId`, { userId: ps.userId });

View File

@@ -42,6 +42,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Lookup user
const user = await getUser(ps.userId).catch(e => {

View File

@@ -25,6 +25,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const userGroup = await UserGroups.insert({
id: genId(),

View File

@@ -26,6 +26,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const userGroup = await UserGroups.findOne({
id: ps.groupId,

View File

@@ -28,6 +28,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch the invitation
const invitation = await UserGroupInvitations.findOne({

View File

@@ -26,6 +26,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch the invitation
const invitation = await UserGroupInvitations.findOne({

View File

@@ -52,6 +52,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({

View File

@@ -20,6 +20,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const ownedGroups = await UserGroups.find({
userId: me.id,

View File

@@ -32,6 +32,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({

View File

@@ -19,6 +19,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const userGroups = await UserGroups.find({
userId: me.id,

View File

@@ -43,6 +43,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({

View File

@@ -32,6 +32,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({

View File

@@ -49,6 +49,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({

View File

@@ -36,6 +36,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the group
const userGroup = await UserGroups.findOne({

View File

@@ -24,6 +24,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const userList = await UserLists.insert({
id: genId(),

View File

@@ -26,6 +26,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const userList = await UserLists.findOne({
id: ps.listId,

View File

@@ -19,6 +19,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const userLists = await UserLists.find({
userId: me.id,

View File

@@ -38,6 +38,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the list
const userList = await UserLists.findOne({

View File

@@ -50,6 +50,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the list
const userList = await UserLists.findOne({

View File

@@ -32,6 +32,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Fetch the list
const userList = await UserLists.findOne({

View File

@@ -36,6 +36,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
// Fetch the list
const userList = await UserLists.findOne({

View File

@@ -84,6 +84,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
// Lookup user
const user = await getUser(ps.userId).catch(e => {

View File

@@ -27,6 +27,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
const query = makePaginationQuery(Pages.createQueryBuilder('page'), ps.sinceId, ps.untilId)
.andWhere(`page.userId = :userId`, { userId: ps.userId })

View File

@@ -57,6 +57,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const profile = await UserProfiles.findOneOrFail(ps.userId);

View File

@@ -35,6 +35,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const query = Users.createQueryBuilder('user')
.where('user.isLocked = FALSE')

View File

@@ -102,6 +102,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const ids = Array.isArray(ps.userId) ? ps.userId : [ps.userId];

View File

@@ -41,6 +41,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const activeThreshold = new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)); // 30日

View File

@@ -46,6 +46,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const activeThreshold = new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)); // 30日

View File

@@ -53,6 +53,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
let user;

View File

@@ -24,6 +24,7 @@ export const meta = {
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId);
if (user == null) {