Commit 21ce91a4 authored by janis.streib's avatar janis.streib 🦉
Browse files

UPD: use new api for oui lookup

parent 72162a3f
......@@ -30,9 +30,18 @@ export default {
methods: {
async createJob(ev) {
ev.preventDefault()
const res = await MacfinderService.ouiLookup(this.search_mac)
this.vendor = res.data.vendor
this.result_mac = res.data.mac
try {
const res = await MacfinderService.ouiLookup(this.search_mac)
this.vendor = res.data.vendor
this.result_mac = res.data.mac
} catch (e) {
if (e.request.status === 404) {
this.vendor = null
this.result_mac = e.response.data.mac
} else {
throw e
}
}
this.search_mac = ''
return true
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment