Added announcement disposal:
Added ann details button Added modal shown on its click Moved trashbox selection there Added trashboxes mock while testing in restricted area
This commit is contained in:
19
front/src/api/dispose/index.ts
Normal file
19
front/src/api/dispose/index.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { API_URL } from '../../config'
|
||||
import { TrashboxDispose, DisposeResponse } from './types'
|
||||
|
||||
const composeDisposeURL = () => (
|
||||
API_URL + '/announcement/dispose?'
|
||||
)
|
||||
|
||||
const composeDisposeBody = (ann_id: number, trashbox: TrashboxDispose) => (
|
||||
JSON.stringify({
|
||||
ann_id,
|
||||
trashbox,
|
||||
})
|
||||
)
|
||||
|
||||
const processDispose = (data: DisposeResponse): boolean => {
|
||||
return data.Success
|
||||
}
|
||||
|
||||
export { composeDisposeURL, composeDisposeBody, processDispose }
|
Reference in New Issue
Block a user