Modify the asset files through Asset API as a background process.

Highlighted
Shopify Partner
27 0 2

Hi guys,

I am developing an app that updates the liquid files of the store. The app is being developed in ROR.

So right now, i am updating the template files through AJAX and it is being updated successfully.

But now we are thinking to update it as a background process and notify customer through email whent the update is complete.

The process can include the update through cron.

Is there any way of doing it on background? If yes could anyone elaborate.

 

Thanks in advance.

 

0 Likes
Shopify Expert
9965 84 1464

So right now, i am updating the template files through AJAX and it is being updated successfully.

How are you handling this AJAX request? I hope you're not exposing the key/password details in that.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Shopify Partner
27 0 2

@Jason Thanks for the reply. 

No I am not exposing the key/password. I am using the shopify_app gem to handle the authentication. I am just calling the controller from AJAX request.

Could you please suggest if I can update the asset files running the background process in rails?

Also can I use the public app authentication key and password as it can be used for private app. I mean somthing like below:

 

shop_url = "https://#{API_KEY}:#{PASSWORD}@#{SHOP_NAME}.myshopify.com/admin"

to create the request.

Regards

 

0 Likes