directus

Unable to get Temporary Token with Directus v8 API

别说谁变了你拦得住时间么 提交于 2021-02-10 14:56:55
问题 I am using the latest Directus v8 release. I installed it and used it to design my schema and everything seems to be ok, but when I try to get a temporary token to authenticate a user I am getting a strange error about not being authorized, at the same time that the AUTH endpoint doesn't require previously authorized users (obviously). My Directus installation is located at htdocs/slotspanel Its URL is http://127.0.0.1/slotspanel The user's credentials are double-checked, they are correct I

Example filter hook to update item with related field

元气小坏坏 提交于 2020-07-19 09:35:28
问题 I have 3 collections: 'customers', 'resellers', and 'orders'. Customers are related to resellers by a many to one relationship. Resellers are related to customers by a one-to-many relationship. Orders relate to a customer by a many-to-one relationship. I want to automatically set the orders.reseller field based on the chosen customer using the previously configured many-to-one relationship. The $payload object only contains 'orders' columns, so I cannot see 'customer.reseller', just 'customer

Example filter hook to update item with related field

那年仲夏 提交于 2020-07-19 09:35:05
问题 I have 3 collections: 'customers', 'resellers', and 'orders'. Customers are related to resellers by a many to one relationship. Resellers are related to customers by a one-to-many relationship. Orders relate to a customer by a many-to-one relationship. I want to automatically set the orders.reseller field based on the chosen customer using the previously configured many-to-one relationship. The $payload object only contains 'orders' columns, so I cannot see 'customer.reseller', just 'customer

Make Multiple Post Requests In Axios then get all the response to make another request

纵饮孤独 提交于 2020-07-10 03:14:37
问题 i have already make 2 request.., but i want to make a patch request using the id from each response... the other one will be put in the first one and the second one will be in the data can we maybe pass it to the var ? idk how to do that.. for reference i use gatsbyjs and i use directusCMS let url3 = `${process.env.GATSBY_DIRECTUS_API_URL}/gemaclc/items/pendaftar/:id (the id should be from the first response that we just made)?access_token=${process.env.GATSBY_DIRECTUS_TOKEN}`; axios.patch

Database Schema for Recipe/Ingredient/Measurement/Amount

依然范特西╮ 提交于 2019-12-11 04:34:13
问题 I'm creating a recipe app to help my wife with her cake hobby. The idea is to create a recipe database to hold all of her cake recipes. Each recipe would have multiple ingredients. Each ingredient would have a measurement (gm, ml, teaspoons etc) and then a quantity. I understand how to create the 'recipes' and 'ingredients' tables and how to link the 2 with a junction table 'recipe_ingredients, however I am struggling with how to then implement the measurement and amount fields. Can anyone