Идентификатор владельца показывает вместо имени пользователяJavascript

Форум по Javascript
Anonymous
Идентификатор владельца показывает вместо имени пользователя

Сообщение Anonymous »

Проблема
Я работаю над этим уже пару дней, пытаясь выяснить, почему Frontend продолжает отображать идентификатор объекта пользователя вместо их имени пользователя. Despite setting up the authentication and role-based logic, the username isn't rendering as expected, and I suspect the issue might be with how the user data is being fetched or decoded from the token.
Ticket Schema


import mongoose from 'mongoose'

const Schema = new mongoose.Schema({
title : {type:String , required : true},
description : {type : String, required : true},
status : { type : String , default: 'open'},
assignedTech: {type: String},
priority: {
type: String,
enum: ['Low', 'Medium', 'High'],
default: 'Low',
required: true
},
owner: {
type: mongoose.Schema.Types.ObjectId,
ref: 'users',
required: true
}

},{timestamps: true})

const TicketModel = mongoose.model("version2",Schema)

export {TicketModel}< /code>
< /div>
< /div>
< /p>
Создать логику билетов < /p>




< /div>
< /div>
< /p>
логика передней части < /p>





Подробнее здесь: https://stackoverflow.com/questions/797 ... f-username

Вернуться в «Javascript»