( collection: Collection | CurrentCollection, )
| 161 | }); |
| 162 | |
| 163 | const updateCollection = ( |
| 164 | collection: Collection | CurrentCollection, |
| 165 | ): Promise<Response> => |
| 166 | fetch(BASE_PATH + 'api/collection', { |
| 167 | method: 'PUT', |
| 168 | headers: DEFAULT_HEADERS, |
| 169 | body: JSON.stringify(collection), |
| 170 | }); |
| 171 | |
| 172 | const getScript = (id: number): Promise<Response> => |
| 173 | fetch(BASE_PATH + `api/scripts/${id}`); |