Skip to content

Commit 479abd4

Browse files
committed
chore: ig user id not needed
1 parent d9ccd88 commit 479abd4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.config/nuxt.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ export default defineNuxtConfig({
5252
clientSecret: ""
5353
},
5454
instagram: {
55-
accessToken: "",
56-
userId: ""
55+
accessToken: ""
5756
}
5857
},
5958

server/utils/instagram.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class InstagramFeed {
2121

2222
async getFeed (fields: InstagramFields[]) {
2323
const query = new URLSearchParams({ fields: fields.join(), access_token: this.accessToken });
24-
const response = await $fetch<{ data: InstagramPost[] }>(`${this.api}/${this.userId}/media?${query}`).catch((e) => {
24+
const response = await $fetch<{ data: InstagramPost[] }>(`${this.api}/me/media?${query}`).catch((e) => {
2525
console.warn(e);
2626
throw createError({ statusCode: ErrorCode.INTERNAL_SERVER_ERROR, message: "Failed to fetch instagram feed" });
2727
});

0 commit comments

Comments
 (0)