-
Notifications
You must be signed in to change notification settings - Fork 26
Migrating more composables and a few vue files #1702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import { usePatchToServiceControl, usePostToServiceControl } from "./serviceServiceControlUrls"; | ||
| import type { Ref } from "vue"; | ||
|
|
||
| export async function useUnarchiveMessage(ids: string[]) { | ||
| const response = await usePatchToServiceControl("errors/unarchive/", ids); | ||
| if (!response.ok) { | ||
| throw response.statusText; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think we should implement https://eslint.org/docs/latest/rules/no-throw-literal
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added rule and updated code accordingly
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but you missed this line?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did! |
||
| } | ||
| } | ||
|
|
||
| export async function useArchiveMessage(ids: string[]) { | ||
| const response = await usePatchToServiceControl("errors/archive/", ids); | ||
| if (!response.ok) { | ||
| throw new Error(response.statusText); | ||
| } | ||
| } | ||
|
|
||
| export async function useRetryMessages(ids: string[]) { | ||
| await usePostToServiceControl("errors/retry", ids); | ||
| } | ||
|
|
||
| export async function useRetryEditedMessage( | ||
| id: string, | ||
| editedMessage: Ref<{ | ||
| messageBody: string; | ||
| headers: unknown[]; | ||
| }> | ||
| ) { | ||
| const payload = { message_body: editedMessage.value.messageBody, message_headers: editedMessage.value.headers }; | ||
| const response = await usePostToServiceControl(`edit/${id}`, payload); | ||
| if (!response.ok) { | ||
| throw new Error(response.statusText); | ||
| } | ||
| } | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this is TypeScript telling us this can only be a number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I typed the
statusto be anumber