Rewrite using typescript, integrate the latest changes from @mwarning/openwrt-firmware-selector

This commit is contained in:
Sudhanshu Gautam 2021-01-10 19:56:13 +05:30
parent d5c4ea592a
commit ce4c36622b
47 changed files with 5269 additions and 5282 deletions

42
src/services/data.ts Normal file
View file

@ -0,0 +1,42 @@
import axios from 'axios';
import config from '../config';
class DataService {
// getVersions = versionsPath => axios.get(versionsPath);
//
// getOverview = overviewPath => axios.get(overviewPath);
//
// getDeviceData = devicePath => axios.get(devicePath);
//
// getDeviceManifest = async manifest_path => {
// const manifest = await axios.get(manifest_path);
// return manifest.data.split('\n');
// };
//
// getDevicePackages = (version, target, profile) =>
// axios.get(
// base_api +
// 'packages_image?distro=openwrt&version=' +
// version.toLowerCase() +
// '&target=' +
// target +
// '&profile=' +
// profile.toLowerCase()
// );
//
// buildImage = (board, packages, target, version, uciDefaults) =>
// axios.post(base_api + 'build-request', {
// profile: board,
// board,
// defaults: uciDefaults,
// distro: 'openwrt',
// packages,
// target,
// version,
// });
//
// buildStatusCheck = request_hash =>
// axios.get(base_api + 'build-request/' + request_hash);
}
export default DataService;