add
This commit is contained in:
parent
b8a8c1b044
commit
bf6d3a6956
|
@ -26,7 +26,6 @@ export class PostService extends BaseService<Prisma.PostDelegate> {
|
|||
}
|
||||
onModuleInit() {
|
||||
EventBus.on('updatePostState', ({ id }) => {
|
||||
console.log('updatePostState');
|
||||
updatePostState(id);
|
||||
});
|
||||
}
|
||||
|
@ -34,7 +33,6 @@ export class PostService extends BaseService<Prisma.PostDelegate> {
|
|||
args: Prisma.PostCreateArgs,
|
||||
params: { staff?: UserProfile; tx?: Prisma.PostDelegate },
|
||||
) {
|
||||
console.log('params?.staff?.id', params?.staff?.id);
|
||||
args.data.authorId = params?.staff?.id;
|
||||
args.data.updatedAt = new Date();
|
||||
// args.data.resources
|
||||
|
|
|
@ -10,7 +10,6 @@ export class VisitService extends BaseService<Prisma.VisitDelegate> {
|
|||
async create(args: Prisma.VisitCreateArgs, staff?: UserProfile) {
|
||||
const { postId, messageId } = args.data;
|
||||
const clientIp = (args.data.meta as any)?.ip;
|
||||
console.log('visit create');
|
||||
const visitorId = args.data.visitorId || staff?.id;
|
||||
let result;
|
||||
const existingVisit = await db.visit.findFirst({
|
||||
|
|
|
@ -15,13 +15,11 @@ export class PostQueueService implements OnModuleInit {
|
|||
constructor(@InjectQueue('general') private generalQueue: Queue) {}
|
||||
onModuleInit() {
|
||||
EventBus.on('updateVisitCount', ({ id, objectType, visitType }) => {
|
||||
console.log('updateVisitCount');
|
||||
if (objectType === ObjectType.POST) {
|
||||
this.addUpdateVisitCountJob({ id, type: visitType });
|
||||
}
|
||||
});
|
||||
EventBus.on('updatePostState', ({ id }) => {
|
||||
console.log('updatePostState');
|
||||
this.addUpdatePostState({ id });
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { db, PostState, PostType, VisitType } from '@nice/common';
|
||||
export async function updatePostViewCount(id: string, type: VisitType) {
|
||||
console.log('updatePostViewCount', type);
|
||||
const totalViews = await db.visit.aggregate({
|
||||
_sum: {
|
||||
views: true,
|
||||
|
|
|
@ -88,7 +88,6 @@ export class TusService implements OnModuleInit {
|
|||
upload: Upload,
|
||||
) {
|
||||
try {
|
||||
console.log('upload.id', upload.id);
|
||||
const resource = await this.resourceService.update({
|
||||
where: { fileId: this.getFileId(upload.id) },
|
||||
data: { status: ResourceStatus.UPLOADED },
|
||||
|
|
|
@ -47,7 +47,6 @@ export default function StaffForm() {
|
|||
rank,
|
||||
office,
|
||||
} = values;
|
||||
console.log("photoUrl", photoUrl);
|
||||
setFormLoading(true);
|
||||
try {
|
||||
if (data && user?.id) {
|
||||
|
|
Loading…
Reference in New Issue