Update like

This commit is contained in:
NAME
2026-05-12 15:32:21 +00:00
parent 1d7bddae27
commit d6220c828e
4 changed files with 134 additions and 63 deletions
+9 -3
View File
@@ -1,7 +1,7 @@
// x-poster.controller.ts
import {Body, Controller, Get, HttpException, Post, Query, Req} from '@nestjs/common';
import {CreateTweetDto, ReplyTweetDto} from './dto/create-tweet.dto';
import {XPosterRouterService, XStrategy} from "./x-poster.router.service";
import {XPosterRouterService} from "./x-poster.router.service";
import {XCookieService} from "./x-cookie.service";
import {XApiService} from "./x-api.service";
import {XCacheService} from "../x-cache/x-cache.service";
@@ -107,8 +107,14 @@ export class XPosterController {
) {
}
@Get('verify')
verify() {
@Get('like')
async likeTweet(@Query('xurl') url: string) {
console.log('xurl==>', url);
if (!url) {
throw new HttpException('xUrl not found', 400);
}
await this.xBrowserService.likeTweet(url);
return 'done';
// const account = {
// authToken: process.env.X_COOKIE_AUTH_TOKEN!, // auth_token cookie
// ct0: process.env.X_COOKIE_CT0!,