Skip to content

Commit 054207b

Browse files
committed
feat: fix repost
1 parent 9aacd5c commit 054207b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libraries/nestjs-libraries/src/integrations/social/linkedin.page.provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ export class LinkedinPageProvider
413413

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

libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
472472
isPersonal = true
473473
) {
474474
try {
475-
await this.fetch(`https://api.linkedin.com/v2/posts`, {
475+
await this.fetch(`https://api.linkedin.com/rest/posts`, {
476476
body: JSON.stringify({
477477
author:
478478
(isPersonal ? 'urn:li:person:' : `urn:li:organization:`) +
@@ -494,7 +494,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
494494
headers: {
495495
'X-Restli-Protocol-Version': '2.0.0',
496496
'Content-Type': 'application/json',
497-
'LinkedIn-Version': '202501',
497+
'LinkedIn-Version': '202504',
498498
Authorization: `Bearer ${integration.token}`,
499499
},
500500
});

0 commit comments

Comments
 (0)