Integration between directus and react-admin - react-admin

I have been trying to solve a "minor" issue for a couple of days now, I am trying to connect a Directus rest api to a simple react-admin, at first i thought it was CORS etc and i tried everything on the backend, requests from postman works okay but it is not loading data to react-admin. The source code with username pass etc is on this repo: https://github.com/charilaouc/fluffy-adventure any ideas?

Related

Storefront event webhooks in Shopware 6 app development

I developing an app and basicly if an user loaded a product in the storefront it should send a request to my server. So i thought thats possible with webhooks. But unfortunately there is no webhook for this case.
The closest thing i could find is the product.written webhook but that seems useless for my case.
Anyone has an idea how i could realize my request?
I use Shopware 6.4.11.1 as development enviroment.
Although I have not found any appropriate webhook in the webhook events reference, this may be doable in a slightly different way, without using the Shopware App Webhook mechanic.
In the Shopware documentation there are shown ways to add Storefront scripts to an app. There is even an example for product-page-loaded. You would be able to execute some of your own code in there, but honestly I have not tried to ping external servers like this and I can't tell you that this will surely work.
You could also potentially add some custom JS code that pings your server with the appropriate info.
Unfortunately I don't think you can compel Shopware to send a request from its backend on a ProductPageLoadedEvent

Json-server how to set a custom URL for the api

I am working on an app and used json-server for the backend api. I published the app using github pages and everything seemed to be working fine on my laptop. But when I try to open the app on another device, it does not work. I realized this was because I am using localhost:3001 as the resource for my api, and this only exists on my laptop. I am now trying to change the resource from localhost:3001 to a custom url 'https://my-json-server.typicode.com/vbrambila2/1RM/movements'. The issue I'm running into now is that the POST, PATCH, and DELETE methods in my actions aren't updating the api anymore. Anyone know what I might be doing wrong?

Vue-social-auth not working on messenger and facebook browser

I am using nuxt for frontend which uses vue-social-auth for social login and laravel for backend which is socialite. It works perfectly well for normal browsers but doesn't work in messanger and Facebook browser. Have anyone come with similar problem.
Any lead is much appreciated.
This has been resolved. If anyone faces this problem then please remove vue-social-auth. The problem was that the Facebook and messenger browsers doesn't close the popup given by vue-social-auth and doesn't redirect to the callback.
So the solution would be removing the vue-social-auth package and do it manually on the frontend and in the backend use the socialite stateless method to return JSON response for API calls.

Google Photos REST API with Angular/Java/dotNet

I am trying to connect to google photo in angular and been searching since last two days about google photos REST api but couldn't find any useful example.
Could somebody help me with this on how to use google photos api in angular. an example would be great if I get it working I will creating sample and put it on github or others to look at.
Another thing I am trying is to connect api without any user interaction. I have tried playgrounds but its prompting to authorize access as well. Idea is to build ionic app that can connect to my google photos without needing me to authenticate access to it with my id and secret.
my app would be in angular(ionic) or java(android) so would prefer example (if any) in those platform but ok with dotnet or php as well. Won't be able to use library in dotnet or php.
Thanks
Bhavesh

Directus api and app on same server as front-end

I'm attempting to create a small website using Directus as a back end, since it has a nice interface for managing a database. The front end will be coded in VueJS, and I'd like them both on the same site. I'm using Apache. For example:
www.example.com = VueJS frontend that pulls information from the Directus backend
www.example.com/admin = Directus admin link
www.example.com/api/[whatever] = RESTful api access
I've messed around with virtualhosts a bit but I can only move the entire directus app to a different port, which I don't want to do since I don't want admins to have to type the port number in manually if they want to access the example.com/admin interface.
I think you can put the API on sub-domain like api.example.com that way both will be available on the same server.
I am just starting with the Directus and met with the same issue of putting both components and thought to put as written above.
If you followed some other approach, pls post here so that it can help people like me.
I have created a small mixin library for Vue.JS 3 and Directus API that makes it easier for developers to make API calls quicker and with almost no code needed.
It supports fetchCollection, fetchBtId, Sort, Filter and Search API endpoints.
Check it out. Hope it helps anybody in the future.
https://github.com/Slaveworx/api-rabbit