import {SERVER_URL} from "../config";
import {parseJwt} from "./parseJwt";
import {getLocalItem} from "./storage";

export function download(fileSeq){
    window.open(encodeURI(SERVER_URL+'/file/download?fileSeq='+fileSeq));
}
export function standardCode(fileSeq){
    const sessionUser = parseJwt(getLocalItem('accessToken'));
    window.open(encodeURI(SERVER_URL+'/file/standardCode-download?userId='+sessionUser?.id+'&fileSeq='+fileSeq));
}
