This commit is contained in:
syuilo
2021-12-09 23:58:30 +09:00
parent 0abe2dfee0
commit c69b72e199
573 changed files with 3318 additions and 3318 deletions

View File

@@ -12,7 +12,7 @@ export const meta = {
limit: {
duration: ms('1hour'),
max: 100
max: 100,
},
requireCredential: true as const,
@@ -22,46 +22,46 @@ export const meta = {
params: {
userId: {
validator: $.type(ID),
}
},
},
errors: {
noSuchUser: {
message: 'No such user.',
code: 'NO_SUCH_USER',
id: 'fcd2eef9-a9b2-4c4f-8624-038099e90aa5'
id: 'fcd2eef9-a9b2-4c4f-8624-038099e90aa5',
},
followeeIsYourself: {
message: 'Followee is yourself.',
code: 'FOLLOWEE_IS_YOURSELF',
id: '26fbe7bb-a331-4857-af17-205b426669a9'
id: '26fbe7bb-a331-4857-af17-205b426669a9',
},
alreadyFollowing: {
message: 'You are already following that user.',
code: 'ALREADY_FOLLOWING',
id: '35387507-38c7-4cb9-9197-300b93783fa0'
id: '35387507-38c7-4cb9-9197-300b93783fa0',
},
blocking: {
message: 'You are blocking that user.',
code: 'BLOCKING',
id: '4e2206ec-aa4f-4960-b865-6c23ac38e2d9'
id: '4e2206ec-aa4f-4960-b865-6c23ac38e2d9',
},
blocked: {
message: 'You are blocked by that user.',
code: 'BLOCKED',
id: 'c4ab57cc-4e41-45e9-bfd9-584f61e35ce0'
id: 'c4ab57cc-4e41-45e9-bfd9-584f61e35ce0',
},
},
res: {
type: 'object' as const,
optional: false as const, nullable: false as const,
ref: 'User'
}
ref: 'User',
},
};
export default define(meta, async (ps, user) => {
@@ -81,7 +81,7 @@ export default define(meta, async (ps, user) => {
// Check if already following
const exist = await Followings.findOne({
followerId: follower.id,
followeeId: followee.id
followeeId: followee.id,
});
if (exist != null) {