Skip to content

Commit

Permalink
refactor (frontend): 추가적인 파라미터는 배제하기
Browse files Browse the repository at this point in the history
os.apiWithDialog(endpoint, data, token?, signal?) => Promise<(Partial<Misskey.entities.MeDetailed> | Misskey.entities.Error['error'])>에 정의되지 않은 5번째 파라미터 (async resolve result) 주입 시 오버플로우로 돌긴 하는데
그냥 Promise<any>.then()으로 하면 되지 않았냐?
  • Loading branch information
HotoRas committed Oct 13, 2024
1 parent 3b388eb commit d470443
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/frontend/src/scripts/get-note-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export function getNoteMenu(props: {
function togglePin(pin: boolean): void {
os.apiWithDialog(pin ? 'i/pin' : 'i/unpin', {
noteId: appearNote.id,
}, undefined, null, res => {
}).then((res: (Partial<Misskey.entities.MeDetailed> | Misskey.entities.Error['error'])) => {
if (res.id === '72dab508-c64d-498f-8740-a8eec1ba385a') {
os.alert({
type: 'error',
Expand Down

0 comments on commit d470443

Please sign in to comment.