Skip to content
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

🐛 Fix geoInformation fieldname #542

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/Message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
mastodonUrl?: string
geoInformation: string
// TODO
attachments: any[]

Check warning on line 20 in src/api/Message.ts

View workflow job for this annotation

GitHub Actions / ESLint Results

src/api/Message.ts#L20

Unexpected any. Specify a different type (@typescript-eslint/no-explicit-any)
}

export function useMessageApi(token: string) {
Expand All @@ -44,19 +44,19 @@
}

// TODO: any
const postMessage = (ticker: string, text: string, geoInformation: any, attachments: any[]): Promise<Response<MessageResponseData>> => {

Check warning on line 47 in src/api/Message.ts

View workflow job for this annotation

GitHub Actions / ESLint Results

src/api/Message.ts#L47

Unexpected any. Specify a different type (@typescript-eslint/no-explicit-any)

Check warning on line 47 in src/api/Message.ts

View workflow job for this annotation

GitHub Actions / ESLint Results

src/api/Message.ts#L47

Unexpected any. Specify a different type (@typescript-eslint/no-explicit-any)
return fetch(`${ApiUrl}/admin/tickers/${ticker}/messages`, {
headers: headers,
body: JSON.stringify({
text: text,
geo_information: geoInformation,
geoInformation: geoInformation,
attachments: attachments,
}),
method: 'post',
}).then(response => response.json())
}

const deleteMessage = (message: Message): Promise<Response<any>> => {

Check warning on line 59 in src/api/Message.ts

View workflow job for this annotation

GitHub Actions / ESLint Results

src/api/Message.ts#L59

Unexpected any. Specify a different type (@typescript-eslint/no-explicit-any)
return fetch(`${ApiUrl}/admin/tickers/${message.ticker}/messages/${message.id}`, {
headers: headers,
method: 'delete',
Expand Down
Loading