Skip to content

Commit

Permalink
trying to fix not working api key implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Haupt committed May 3, 2024
1 parent 5baf0c8 commit 6790a4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pages/network/abuse-ip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const checkIP = async () => {
verbose: true,
},
});
result.value = response.data.data; // Hier ändern wir die Zuweisung, um auf die Daten zuzugreifen
result.value = response.data.data;
} catch (error) {
console.error("Error fetching IP information:", error);
result.value = null;
Expand Down
5 changes: 2 additions & 3 deletions server/api/abuse-ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import axios from 'axios';
import { defineEventHandler, getQuery } from 'h3';

const config = useRuntimeConfig();
const API_KEY = config.public.abuse;

console.log('API_KEY:', API_KEY);
//const API_KEY = config.public.abuse;
const API_KEY = process.env.ABUSE_IP_DB;

export default defineEventHandler(async (process) => {
const query = getQuery(process);
Expand Down

0 comments on commit 6790a4e

Please sign in to comment.