feat: fix repost

This commit is contained in:
Nevo David 2025-04-30 00:16:31 +07:00
parent 9aacd5cddb
commit 054207bde9
2 changed files with 4 additions and 4 deletions

View File

@ -413,7 +413,7 @@ export class LinkedinPageProvider
if (totalLikes >= +fields.likesAmount) {
await timer(2000);
await this.fetch(`https://api.linkedin.com/v2/posts`, {
await this.fetch(`https://api.linkedin.com/rest/posts`, {
body: JSON.stringify({
author: `urn:li:organization:${integration.internalId}`,
commentary: '',
@ -433,7 +433,7 @@ export class LinkedinPageProvider
headers: {
'X-Restli-Protocol-Version': '2.0.0',
'Content-Type': 'application/json',
'LinkedIn-Version': '202501',
'LinkedIn-Version': '202504',
Authorization: `Bearer ${integration.token}`,
},
});

View File

@ -472,7 +472,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
isPersonal = true
) {
try {
await this.fetch(`https://api.linkedin.com/v2/posts`, {
await this.fetch(`https://api.linkedin.com/rest/posts`, {
body: JSON.stringify({
author:
(isPersonal ? 'urn:li:person:' : `urn:li:organization:`) +
@ -494,7 +494,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
headers: {
'X-Restli-Protocol-Version': '2.0.0',
'Content-Type': 'application/json',
'LinkedIn-Version': '202501',
'LinkedIn-Version': '202504',
Authorization: `Bearer ${integration.token}`,
},
});