ebanutsya
This commit is contained in:
12
src/api/printingApi.ts
Normal file
12
src/api/printingApi.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import apiClient from "./apiClient";
|
||||
|
||||
const router = '/printing';
|
||||
|
||||
const printingApi = {
|
||||
getLabel: async (orderId: number): Promise<Uint8Array> => {
|
||||
let response = await apiClient.get(`${router}/getLabel?orderId=${orderId}`, {responseType: 'arraybuffer'});
|
||||
return new Uint8Array(response.data);
|
||||
|
||||
},
|
||||
}
|
||||
export default printingApi;
|
||||
Reference in New Issue
Block a user