GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: info authorNickname · Team-O2/Back-end@23d804e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/service
    • adminService.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/service/adminService.ts‎

Copy file name to clipboardExpand all lines: src/service/adminService.ts
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,16 @@ export const postAdminConcert = async (
247247
return -2;
248248
}
249249

250+
const authorUser = await User.findOne({ nickname: authorNickname });
251+
var authorID;
252+
if (authorUser) {
253+
authorID = authorUser._id;
254+
} else {
255+
authorID = userID;
256+
}
250257
const concert = new Concert({
251258
title: title.toLowerCase(),
252-
user: userID,
259+
user: authorID,
253260
createdAt: new Date(),
254261
videoLink: url.videoLink,
255262
imgThumbnail: url.imgThumbnail,

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.