mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
fix missing publisher username
This commit is contained in:
parent
f3a6dded5d
commit
4fb8755c32
@ -130,7 +130,7 @@ export default (props) => {
|
|||||||
playlist.publisher && <div className="play_info_statistics_item">
|
playlist.publisher && <div className="play_info_statistics_item">
|
||||||
<p
|
<p
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
app.navigation.goToAccount(playlist.user.username)
|
app.navigation.goToAccount(playlist.publisher.username)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icons.MdPerson />
|
<Icons.MdPerson />
|
||||||
|
@ -112,6 +112,13 @@ export default async (req, res) => {
|
|||||||
|
|
||||||
playlist = playlist.toObject()
|
playlist = playlist.toObject()
|
||||||
|
|
||||||
|
playlist.publisher = {
|
||||||
|
user_id: req.session.user_id.toString(),
|
||||||
|
fullName: userData.fullName,
|
||||||
|
username: userData.username,
|
||||||
|
avatar: userData.avatar,
|
||||||
|
}
|
||||||
|
|
||||||
playlist.list = await Promise.all(req.body.list.map(async (track, index) => {
|
playlist.list = await Promise.all(req.body.list.map(async (track, index) => {
|
||||||
if (typeof track !== "object") {
|
if (typeof track !== "object") {
|
||||||
return track
|
return track
|
||||||
|
@ -30,6 +30,9 @@ export default {
|
|||||||
type: Date,
|
type: Date,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
publisher: {
|
||||||
|
type: Object,
|
||||||
|
},
|
||||||
public: {
|
public: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user