Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

basiC

User
  • Registriert

  • Letzter Besuch

  1. Hi Ich kann normal einen Post erstellen. Ich erstelle es mit einem Autorisierungs-JWT-Token, mein Forum Schema hat ein CreatedBy Attribut, sodass in meinem Token auch meine userID enthalten ist. Ich möchte nur wissen, wie ich mit JWT Token einmal alle Posts finden kann, die von Admin erstellt wurden und zweitens, die von einem anderen Benutzer erstellt wurden. Ich habe zwei HTTP-Anfragen. Zuerst: GET http://localhost:8080/forum/getpostsadmin Authorization: Bearer {token} exports.getByToken = async(req,res) => { Forum.find({_id: req.params._id}, function(err, docs) { if (err) { res.json(err); } else { res.json(docs); } }); }; GET http://localhost:8080/forum/getOwner Authorization: Bearer {token} Content-Type: application/json { "ownerID": "another User" } exports.getByOwnerID = async (req, res, next) => { Forum.find({ createdBy: req.body.createdBy }) .then(doc => { if(!doc) { return res.status(400).end();} return res.status(200).json(doc); }) .catch(err => next(err)); } Forum Schema: const forumSchema = ({ forumName: { type: String, required: true, }, forumDescription: { type: String, required: true, }, createdBy: { type: Schema.Types.ObjectId, ref: 'User' }, published_on: { type: String, default: moment().format("LLL") }, }); Falls weitere Fragen offen sind würde ich SIe beantworten.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.