thundra-layer-python

node v14.18.1
version: 1.0.0
endpointsharetweet
const axios = require('axios'); exports.endpoint = function(req, res) { let thundra_logo_svg = `<svg width="174px" height="119px" viewBox="0 0 174 119" version="1.1" xmlns="http://www.w3.org/2000/svg"><title>Fill 1</title><desc>Created with Sketch.</desc><defs></defs><g id="error-pages" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-672.000000, -437.000000)" opacity="0.5"><path d="M705.827239,556 L705.827239,554.453611 L714.604168,551.590012 L705.878286,552.536963 L706.0125,549.477295 C706.0125,549.477295 719.799491,550.281152 724.371352,547.768521 C728.943212,545.255891 756.804549,528.685254 756.804549,528.685254 C756.804549,528.685254 741.716433,529.228549 728.709199,521.261088 L735.558961,509.602274 L723.223941,518.716498 C713.760172,514.9071 707.49401,509.516475 706.246226,508.392169 C706.17998,508.307234 706.115167,508.223739 706.051215,508.140819 L718.921081,495.930649 C718.921081,495.930649 708.593814,500.487761 701.422572,503.051065 C701.17594,502.861617 700.845568,502.55614 700.456694,502.168895 C704.097377,499.901567 709.167663,496.785179 709.167663,496.785179 L696.983204,498.371589 C696.250192,498.037896 693.912354,495.712698 691.639902,491.980748 C689.36745,488.248799 688.226923,485.392111 688.226923,485.392111 L716.625973,475.708103 L683.345052,472.989325 C683.345052,472.989325 682.77149,472.701411 681.624366,470.398094 C680.477243,468.094777 679.907983,465.4546 679.907983,465.4546 L706.299281,462.036766 L675.028406,454.274876 C675.028406,454.274876 672.568973,450.190808 672.160597,446.501182 C671.587036,441.318719 672.734159,437 672.734159,437 C672.734159,437 697.137492,437.826603 721.52075,446.086585 C745.903721,454.346279 749.304655,469.822265 749.304655,469.822265 C749.878217,490.044523 754.74919,504.505034 771.386783,516.752345 C788.024663,528.999656 806.085263,525.312334 813.830354,518.191918 C819.787654,512.715206 812.39645,509.55448 812.39645,509.55448 C812.39645,509.55448 822.93278,508.615303 831.323988,510.130309 C840.790338,511.839082 846,517.007437 846,517.007437 L705.827239,556 Z" id="Fill-1" fill="#FFFFFF"></path></g></svg>`; let data = { schemaVersion: 1, label: "thundra-layer-python3.6", labelColor: "4528ab", message: "1.0.5", logoSvg: thundra_logo_svg }; axios.get('https://layers.thundra.io/layers/us-west-2/python3.6/latest') .then(response => { console.log(response.data); const layerData = response.data; const version = layerData.latest[0].LatestMatchingVersion.Version; data = { ...data, message: `${version}` } res.end(JSON.stringify(data)); }) .catch(error => { console.log(error); res.end(JSON.stringify(data)); }); // res.end(JSON.stringify(data)); }
Loading…

no comments

    sign in to comment