Formatting/Linting
This commit is contained in:
		@@ -1,30 +1,38 @@
 | 
			
		||||
import axios from 'axios';
 | 
			
		||||
const config = {
 | 
			
		||||
    username: "niggl",
 | 
			
		||||
    password: "niggl"
 | 
			
		||||
}
 | 
			
		||||
export default class Apiclient {
 | 
			
		||||
    static async getUrls() {
 | 
			
		||||
        return (await axios.get("https://kauft.es/api?showVisits=true", {
 | 
			
		||||
            auth: config
 | 
			
		||||
        })).data
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static async getUrlDetails(shortcode) {
 | 
			
		||||
        return (await axios.get(`https://kauft.es/api/${shortcode}`, {
 | 
			
		||||
            auth: config
 | 
			
		||||
        })).data
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static async getUrlVisits(shortcode) {
 | 
			
		||||
        return (await axios.get(`https://kauft.es/api/${shortcode}/visits`, {
 | 
			
		||||
            auth: config
 | 
			
		||||
        })).data
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static async deleteUrl(shortcode) {
 | 
			
		||||
        return (await axios.delete(`https://kauft.es/api/${shortcode}`, {
 | 
			
		||||
            auth: config
 | 
			
		||||
        })).status
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
import axios from 'axios';
 | 
			
		||||
const config = {
 | 
			
		||||
	username: 'niggl',
 | 
			
		||||
	password: '9VEBc596T7tiPB7mNJukfeH9LfGzrrJN'
 | 
			
		||||
};
 | 
			
		||||
export default class Apiclient {
 | 
			
		||||
	static async getUrls() {
 | 
			
		||||
		return (
 | 
			
		||||
			await axios.get('https://kauft.es/api?showVisits=true', {
 | 
			
		||||
				auth: config
 | 
			
		||||
			})
 | 
			
		||||
		).data;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	static async getUrlDetails(shortcode) {
 | 
			
		||||
		return (
 | 
			
		||||
			await axios.get(`https://kauft.es/api/${shortcode}`, {
 | 
			
		||||
				auth: config
 | 
			
		||||
			})
 | 
			
		||||
		).data;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	static async getUrlVisits(shortcode) {
 | 
			
		||||
		return (
 | 
			
		||||
			await axios.get(`https://kauft.es/api/${shortcode}/visits`, {
 | 
			
		||||
				auth: config
 | 
			
		||||
			})
 | 
			
		||||
		).data;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	static async deleteUrl(shortcode) {
 | 
			
		||||
		return (
 | 
			
		||||
			await axios.delete(`https://kauft.es/api/${shortcode}`, {
 | 
			
		||||
				auth: config
 | 
			
		||||
			})
 | 
			
		||||
		).status;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user