2023-07-29 18:47:23 +03:00

17 lines
490 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { API_URL } from '../../config'
import { RemoveAnnouncement, RemoveAnnouncementResponse } from './types'
const composeRemoveAnnouncementURL = () => (
API_URL + '/announcement?'
)
function processRemoveAnnouncement(data: RemoveAnnouncementResponse): RemoveAnnouncement {
if (!data.Answer) {
throw new Error('Не удалось закрыть объявление')
}
return data.Answer
}
export { composeRemoveAnnouncementURL, processRemoveAnnouncement }