|
@@ -372,7 +372,7 @@ export class AiChatService {
|
|
|
}
|
|
|
|
|
|
async getPost(limit?: number, skip?: number, uid?: string): Promise<any> {
|
|
|
- let sql = `SELECT "DramaPost"."objectId", "DramaPost".content,"DramaPost".images,
|
|
|
+ let sql = `SELECT "DramaPost"."objectId", "DramaPost".content,"DramaPost".images,"DramaPost"."isVerify",
|
|
|
us."objectId" uid, us.avatar,us.nickname,"Profile"."identyType",TO_CHAR("DramaPost"."createdAt", 'YYYY-MM-DD HH24:MI') AS formatted_date,
|
|
|
(SELECT "isVerify" FROM "DramaPostLog"
|
|
|
WHERE "DramaPostLog"."dramaPost" = "DramaPost"."objectId"
|
|
@@ -398,6 +398,7 @@ export class AiChatService {
|
|
|
WHERE "DramaPost"."company" = '${this.company}'
|
|
|
AND "DramaPost"."isDeleted" IS NOT TRUE
|
|
|
${uid ? `AND "DramaPost"."user" = '${uid}'` : ''}
|
|
|
+ ${uid ? `` : `AND "DramaPost"."isVerify" IS TRUE`}
|
|
|
ORDER BY "DramaPost"."createdAt" DESC
|
|
|
OFFSET ${skip ?? 0} LIMIT ${limit ?? 10}`;
|
|
|
let res: any = await this.http.customSQL(sql);
|