Ian
MManifest
•Created by Ian on 1/15/2025 in #questions-🙋
How do I send the currently logged in user on a request?
I have this entity:
Movement:
seedCount: 3
mainProp: movementType
properties:
- { name: movementType, type: text, validation: { isNotEmpty: true } }
- { name: date, type: date }
- { name: notes, type: text }
belongsTo:
- Sign
- User
- Property
- StorageLocation
Which belongs to an User.
I've found the only way to send the User is to send it in the form as a hidden field, which of course isn't secure or ideal.
// Create movement data - userId from hidden field
const movementData: MovementData = {
signId,
movementType,
date: formattedDate,
notes: formData.get("notes") as string,
userId: Number(formData.get("userId")),
};
Any tips on how this should be done?
2 replies
MManifest
•Created by Ian on 1/14/2025 in #questions-🙋
Is there a way to extend Manifest admin panel actions?
For example, I've created a property signs entity. When I create one, I want to generate a QR code for it. Is there any way to have something like an onSave action, or should I do it from a separate frontend and generate the QR in an Astro API route?
2 replies