Browse Source

changed tags from array to string

pull/1/head
Senta Mandutz 5 years ago
parent
commit
e278cbf6ec
2 changed files with 7 additions and 7 deletions
  1. 1
    1
      message.model.js
  2. 6
    6
      public/createMessage.js

+ 1
- 1
message.model.js View File

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);

+ 6
- 6
public/createMessage.js View File

<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">
<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>

Loading…
Cancel
Save