Fixed ann removal

This commit is contained in:
2023-07-29 18:43:44 +03:00
parent e214ea53e7
commit cf81e3d817
6 changed files with 53 additions and 27 deletions

View File

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