Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoint, auth and p256dh in oracle table #23

Open
guliverNS opened this issue Oct 15, 2020 · 1 comment
Open

Endpoint, auth and p256dh in oracle table #23

guliverNS opened this issue Oct 15, 2020 · 1 comment

Comments

@guliverNS
Copy link

Hi Vincent
I have only one step to finish this journey, so please help.
This your desciption is great, and it works for all the subscribers.
I've made a small changes on pushnotification.js, and now works well for the specific user, when i copy endpoint, auth and p256dh from Firebase and then use those data in my SQL Developer like this:

/***/

declare
l_rest_return clob;

l_endpoint VARCHAR2(2000);
l_auth VARCHAR2(2000);
l_p256dh VARCHAR2(2000);
l_title VARCHAR2(2000);
l_body VARCHAR2(2000);

l_values VARCHAR2(4000);
begin
l_endpoint := 'someEndpointFromFirebase';
l_auth := 'someAuthFromFirebase';
l_p256dh := 'someP256dhFromFirebase';
l_title := 'Title';
l_body := 'Body';

l_values := l_endpoint||','||l_auth||','||l_p256dh||','||l_title||','||l_body;

l_rest_return := apex_web_service.make_rest_request(
p_url => 'http://myserver:3057/push' -- My custom REST endpoint (1)
, p_http_method => 'GET'
, p_parm_name => apex_util.string_to_table('endpoint:auth:p256dh:title:body') -- Notification structure (2)
, p_parm_value => apex_util.string_to_table(l_values,',') -- Notification Content (3)
);
end;

/***/

But I don't know how to get those data and insert them in my oracle table, at the moment when user click on button "Enable notifications".
Without that, notifications doesnt have to much sense. I believe that I must do something in the part of the app.js, that I send as an attachment.

So, to resume, my question is

  • How can i get endpoint, auth and p256dh at the moment when user alow notifications and then insert those data in oracle table?
    Thanks a lot!
    pitanje
@guliverNS
Copy link
Author

OK, I solved it, tnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant