Skip to content

Commit 3e0438b

Browse files
committed
Add publishData and publishDataBlob
Signed-off-by: Andrew Richardson <[email protected]>
1 parent 2185483 commit 3e0438b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/firefly.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ export default class FireFly extends HttpBase {
190190
return this.createOne<FireFlyDataResponse>('/data', data, options);
191191
}
192192

193+
publishData(id: string, options?: FireFlyCreateOptions): Promise<FireFlyDataResponse> {
194+
return this.createOne<FireFlyDataResponse>(`/data/${id}/value/publish`, {}, options);
195+
}
196+
193197
async uploadDataBlob(
194198
blob: string | Buffer | Readable,
195199
filename: string,
@@ -222,13 +226,8 @@ export default class FireFly extends HttpBase {
222226
return response.data;
223227
}
224228

225-
async publishDataBlobToSharedStorage(
226-
dataid: string
227-
): Promise<FireFlyDataResponse> {
228-
const response = await this.wrapError(
229-
this.http.post<FireFlyDataResponse>(`/data/${dataid}/blob/publish`, {dataid}),
230-
);
231-
return response.data;
229+
publishDataBlob(id: string, options?: FireFlyCreateOptions): Promise<FireFlyDataResponse> {
230+
return this.createOne<FireFlyDataResponse>(`/data/${id}/blob/publish`, {}, options);
232231
}
233232

234233
getBatches(

0 commit comments

Comments
 (0)