import { request } from "./request.js";
import { bool_response } from "./bool_response.js";

export class edit_image_request extends request {
    #image;
    #target;

    constructor(target, image) {
        super();

        this.#target = target;
        this.#image = image;
    }

    get _response() {
        return bool_response;
    }

    get data() {
        return {
            "image": this.#image,
            "apikey": this._apikey
        };
    }

    get method() {
        return "POST";
    }

    get url() {
        return "/product/update/image/barcode/" + this.#target.barcode;
    }
}
