mirror of
https://github.com/nolanlawson/pinafore
synced 2024-12-13 10:48:19 +01:00
8d5690d63d
* remove get() with string pt 1 * remove get() with string pt 2 * fix typo * fix some null exceptions in get() * fixup code style
15 lines
440 B
JavaScript
15 lines
440 B
JavaScript
import { store } from '../_store/store'
|
|
import { deleteStatus } from '../_api/delete'
|
|
import { toast } from '../_utils/toast'
|
|
|
|
export async function doDeleteStatus (statusId) {
|
|
let { currentInstance, accessToken } = store.get()
|
|
try {
|
|
await deleteStatus(currentInstance, accessToken, statusId)
|
|
toast.say('Status deleted.')
|
|
} catch (e) {
|
|
console.error(e)
|
|
toast.say('Unable to delete status: ' + (e.message || ''))
|
|
}
|
|
}
|