Skip to content

Commit a89cb6d

Browse files
feat: 봇 / 서버 - 소유주 간 관계도 개선 (#659)
* feat: implement owners mapping table * feat: add manual deploy * fix: query by vanity does not work * fix: do not fetch users on list queries * fix: updating owners does not work properly * fix: owner is not shown properly * ci: remove branch input on manual publish --------- Co-authored-by: Eunwoo Choi <[email protected]>
1 parent 4ec2ff1 commit a89cb6d

File tree

6 files changed

+175
-155
lines changed

6 files changed

+175
-155
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ module.exports = {
3535
'@typescript-eslint/explicit-function-return-type': 'off',
3636
'@typescript-eslint/explicit-module-boundary-types': 'off',
3737
'@typescript-eslint/no-unused-vars': ['warn'],
38+
'@typescript-eslint/no-explicit-any': 'off',
3839
quotes: ['error', 'single'],
3940
semi: ['error', 'never'],
4041
},

pages/pendingBots/[id]/[date].tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { get } from '@utils/Query'
77
import { BotSubmissionDenyReasonPresetsName, git } from '@utils/Constants'
88
import Day from '@utils/Day'
99

10-
import { SubmittedBot, User } from '@types'
10+
import { SubmittedBot } from '@types'
1111

1212
import useClipboard from 'react-use-clipboard'
1313
import { ParsedUrlQuery } from 'querystring'
@@ -146,15 +146,12 @@ const PendingBot: NextPage<PendingBotProps> = ({ data }) => {
146146
))}
147147
</div>
148148
<h2 className='3xl mb-2 mt-2 font-bold'>제작자</h2>
149-
{(data.owners as User[]).map((el) => (
150-
<Owner
151-
key={el.id}
152-
id={el.id}
153-
tag={el.tag}
154-
globalName={el.globalName}
155-
username={el.username}
156-
/>
157-
))}
149+
<Owner
150+
id={data.owner.id}
151+
tag={data.owner.tag}
152+
globalName={data.owner.globalName}
153+
username={data.owner.username}
154+
/>
158155
<div className='list grid'>
159156
{data.discord && (
160157
<a

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"types/index.ts"
1313
]
1414
},
15-
"target": "es5",
15+
"target": "es6",
1616
"lib": [
1717
"dom",
1818
"dom.iterable",

types/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export interface List<T> {
206206
export interface SubmittedBot {
207207
id: string
208208
date: number
209-
owners: User[]
209+
owner: User
210210
lib: Library
211211
prefix: string
212212
intro: string
@@ -378,3 +378,8 @@ export interface ResponseProps<T = Data> {
378378
interface Data<T = unknown> {
379379
[key: string]: T
380380
}
381+
382+
export enum ObjectType {
383+
Bot = 1,
384+
Server = 2,
385+
}

0 commit comments

Comments
 (0)