Update like
This commit is contained in:
@@ -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!,
|
||||
|
||||
Reference in New Issue
Block a user