changed tags from array to string

This commit is contained in:
Senta Mandutz 2019-02-08 15:23:35 +01:00
parent 5a4bb82f4e
commit e278cbf6ec
2 changed files with 7 additions and 7 deletions

View File

@ -14,7 +14,7 @@ const MessageSchema = mongoose.Schema({
subject: { type: String, required: true }, subject: { type: String, required: true },
message: { type: String, required: true }, message: { type: String, required: true },
user: { type: String, required: true }, user: { type: String, required: true },
tag: {type: [String] }, tag: {type: String },
}); });
module.exports = mongoose.model('Message', MessageSchema); module.exports = mongoose.model('Message', MessageSchema);

View File

@ -3,8 +3,12 @@ const CreateMsgRouter = {
<div class="card om-card"> <div class="card om-card">
<h4>Neue Nachricht erstellen</h4> <h4>Neue Nachricht erstellen</h4>
<form class="new-msg-form" @submit.prevent=createMsg> <form class="new-msg-form" @submit.prevent=createMsg>
<div class="form-group">
<label class="bmd-label-floating">User*</label>
<input type="text" class="form-control" id="user">
</div>
<div class="form-group bmd-form-group"> <div class="form-group bmd-form-group">
<label class="bmd-label-floating">Betreff</label> <label class="bmd-label-floating">Betreff*</label>
<input type="text" class="form-control" id="subject"> <input type="text" class="form-control" id="subject">
</div> </div>
<div class="form-group bmd-form-group"> <div class="form-group bmd-form-group">
@ -12,13 +16,9 @@ const CreateMsgRouter = {
<input type="text" class="form-control" id="tag"> <input type="text" class="form-control" id="tag">
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="bmd-label-floating">Nachricht</label> <label class="bmd-label-floating">Nachricht*</label>
<textarea class="form-control" id="message" rows="5"></textarea> <textarea class="form-control" id="message" rows="5"></textarea>
</div> </div>
<div class="form-group">
<label class="bmd-label-floating">User</label>
<input type="text" class="form-control" id="user">
</div>
<button class="btn btn-default"><a @click="$router.go(-1)">ABBRECHEN </a></button> <button class="btn btn-default"><a @click="$router.go(-1)">ABBRECHEN </a></button>
<button type="submit" class="btn btn-raised om-btn"><a @click="$router.push('/home')">SENDEN</a></button> <button type="submit" class="btn btn-raised om-btn"><a @click="$router.push('/home')">SENDEN</a></button>
</form> </form>