Weglot for Datasnipper - updated templates. Approved to move Walmart screenshots scripts to a cloud host. Need to re-write it in playwright
This commit is contained in:
@ -11,21 +11,12 @@
|
|||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js" type="text/javascript"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js" type="text/javascript"></script>
|
||||||
|
|
||||||
{% comment %}
|
|
||||||
<script type="text/javascript" src="https://cdn.weglot.com/weglot.min.js"></script>
|
<script type="text/javascript" src="https://cdn.weglot.com/weglot.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
Weglot.initialize({
|
Weglot.initialize({
|
||||||
api_key: 'wg_65c22885fee5b146978034548c4f888a6',
|
api_key: 'wg_65c22885fee5b146978034548c4f888a6',
|
||||||
switchers: [
|
switchers: [
|
||||||
{
|
{
|
||||||
style: {
|
|
||||||
full_name: true,
|
|
||||||
with_name: true,
|
|
||||||
is_dropdown: false,
|
|
||||||
with_flags: true,
|
|
||||||
flag_type: "circle",
|
|
||||||
invert_flags: false
|
|
||||||
},
|
|
||||||
location: {
|
location: {
|
||||||
target: ".np-header",
|
target: ".np-header",
|
||||||
sibling: null
|
sibling: null
|
||||||
@ -34,7 +25,6 @@
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endcomment %}
|
|
||||||
|
|
||||||
{% include 'generic_tns_carousel' %}
|
{% include 'generic_tns_carousel' %}
|
||||||
{% include 'function_update_event_timezone' %}
|
{% include 'function_update_event_timezone' %}
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
{% if ready %}
|
{% if ready %}
|
||||||
<script>
|
<script>
|
||||||
if (window.location.pathname != '/app/dashboard'){
|
if (window.location.pathname != '/app/dashboard'){
|
||||||
@ -26,8 +27,8 @@
|
|||||||
<div class="waiting-room-container">
|
<div class="waiting-room-container">
|
||||||
<img class="image" src="https://s3.amazonaws.com/static.northpass.com/Mizuno+Golf/logo.png">
|
<img class="image" src="https://s3.amazonaws.com/static.northpass.com/Mizuno+Golf/logo.png">
|
||||||
<div class="text">
|
<div class="text">
|
||||||
Thank you for entering your PGA ID!
|
Thank you for entering your PGA ID!
|
||||||
Please wait while we configure the school for you.
|
Please wait while we configure the school for you.
|
||||||
You’ll be automatically redirected when it's ready!
|
You’ll be automatically redirected when it's ready!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -102,4 +103,4 @@
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -17,8 +17,8 @@ def find_pictures(currentdir):
|
|||||||
|
|
||||||
def split_resources(files, currentdir):
|
def split_resources(files, currentdir):
|
||||||
try:
|
try:
|
||||||
resource_title = files[0]
|
resource_title = files[0][:-6]
|
||||||
resource_title = resource_title[:-6]
|
# resource_title = resource_title[:-6]
|
||||||
files.sort()
|
files.sort()
|
||||||
new_list = []
|
new_list = []
|
||||||
for file in files:
|
for file in files:
|
||||||
|
|||||||
@ -8,9 +8,7 @@ const apiKey = "6hUfJdAartHTHhHc0WIRZYPWe"
|
|||||||
// Luminate Production ^
|
// Luminate Production ^
|
||||||
const uid = "/\?uid\=7beg87y4-fh24-4929-3rt5-24kdn87s5241";
|
const uid = "/\?uid\=7beg87y4-fh24-4929-3rt5-24kdn87s5241";
|
||||||
const groupIds = [
|
const groupIds = [
|
||||||
'855e2704-fd95-456f-a4eb-ce31c13b3072',
|
'db8120fa-2107-4d69-b557-47509cfb594c',
|
||||||
'ba23909e-49fd-4458-81bc-99e9fe35faee',
|
|
||||||
'efdfb1a5-58c8-4fd4-a31c-60946e73b6ed',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const getAllGroups = async (num) => {
|
const getAllGroups = async (num) => {
|
||||||
|
|||||||
23
Scripts/base64_test_sps.py
Normal file
23
Scripts/base64_test_sps.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import base64
|
||||||
|
import hashlib
|
||||||
|
import hmac
|
||||||
|
import json
|
||||||
|
import logging
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
|
||||||
|
def verify_northpass_authorization(auth_token: str, request_data: dict) -> bool:
|
||||||
|
"""
|
||||||
|
Verifies that the authorization token is valid.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
auth_token: The authorization token provided from Northpass
|
||||||
|
request_data: The data provided by Northpass
|
||||||
|
|
||||||
|
Returns: True if the authorization token is valid or False if not
|
||||||
|
"""
|
||||||
|
asm_northpass_secret = "EXAMPLE-SECRET".encode("utf-8")
|
||||||
|
encoded_body = json.dumps(request_data.__dict__, separators=(",", ":")).encode("utf-8")
|
||||||
|
asm_hash = hmac.new(key=asm_northpass_secret, msg=encoded_body, digestmod=hashlib.sha256).digest()
|
||||||
|
return auth_token == base64.b64encode(asm_hash).decode("utf-8")
|
||||||
|
|
||||||
20
Todos.md
20
Todos.md
@ -116,7 +116,7 @@ message](https://northpasshq.slack.com/archives/C04RER4PH09/p1709147957374999?th
|
|||||||
|
|
||||||
## 03-12-2024
|
## 03-12-2024
|
||||||
|
|
||||||
- [X] Emerging markets outreach - $50k+ goes to Easton. Under that goes to Kat. Be sparing with Kellie - C-level and brand name/SaaS/Good Logo. CC Kat on _all_ check ins. Send reminder to #ce-cs.
|
- [X] Emerging markets outreach - $50k+ goes to Easton. Under that goes to Kat. Be sparing with Kellie - C-level and brand name/SaaS/Good Logo. CC Kat on *all* check ins. Send reminder to #ce-cs.
|
||||||
- [X] Reach out to Chris and ask for executive sponsor. If they ask why, we say this is standard procedure and we actually recommend the same to our customers. Direct line of contact to our executive team.
|
- [X] Reach out to Chris and ask for executive sponsor. If they ask why, we say this is standard procedure and we actually recommend the same to our customers. Direct line of contact to our executive team.
|
||||||
- [X] Add TL tl;dr notes for Artera, Williams-Sonoma
|
- [X] Add TL tl;dr notes for Artera, Williams-Sonoma
|
||||||
- [X] Clone courses into sandbox and remove templates for Big Ideas
|
- [X] Clone courses into sandbox and remove templates for Big Ideas
|
||||||
@ -125,7 +125,7 @@ message](https://northpasshq.slack.com/archives/C04RER4PH09/p1709147957374999?th
|
|||||||
## 03-13-2024
|
## 03-13-2024
|
||||||
|
|
||||||
- [X] Artera: ask for DB query of all courses in HTML formatting in spreadsheet
|
- [X] Artera: ask for DB query of all courses in HTML formatting in spreadsheet
|
||||||
* This may no longer be possible due to a security flaw in how we stored RTE data.
|
- This may no longer be possible due to a security flaw in how we stored RTE data.
|
||||||
- [X] Blacklane - invite Timo to sandbox
|
- [X] Blacklane - invite Timo to sandbox
|
||||||
- [X] Blacklane - Add check on login page for group, if group exists, bypass selection screen
|
- [X] Blacklane - Add check on login page for group, if group exists, bypass selection screen
|
||||||
- [X] Blacklane - Ask if there is an endpoint that shows the courses within an LP & the order
|
- [X] Blacklane - Ask if there is an endpoint that shows the courses within an LP & the order
|
||||||
@ -145,11 +145,23 @@ message](https://northpasshq.slack.com/archives/C04RER4PH09/p1709147957374999?th
|
|||||||
|
|
||||||
## 03-25-2024
|
## 03-25-2024
|
||||||
|
|
||||||
- [ ] Cin7 - Clone all courses from Customers to Partner instance
|
- [X] Cin7 - Clone all courses from Customers to Partner instance
|
||||||
- [X] Cin7 - Clone all templates from Customer to Partner instance --> Had to change domain away from partneracademy.cin7.com
|
- [X] Cin7 - Clone all templates from Customer to Partner instance --> Had to change domain away from partneracademy.cin7.com
|
||||||
- [X] Cin7 - Create Google Sheet & Script that pulls list of courses.
|
- [X] Cin7 - Create Google Sheet & Script that pulls list of courses.
|
||||||
|
|
||||||
## 03-26-2024
|
## 03-26-2024
|
||||||
|
|
||||||
- [ ] Walmart - we _must_ get screenshots to them.
|
- [X] Walmart - we *must* get screenshots to them. Discuss with Rob & Allyson
|
||||||
|
|
||||||
|
## 03-27-2024
|
||||||
|
|
||||||
|
- [ ] Walmart - Ask if they can expose storage in Azure.
|
||||||
|
|
||||||
|
SPS - Note to product team re: HMAC hashes not aligning.
|
||||||
|
```text
|
||||||
|
Team - this is for and and all Ruby experts! I have a client that is having trouble verifying Northpass webhooks in their system. They are using python, if it matters, but I think both python and ruby use unicode for their encoding. So they have correctly written the function to verify the hash, but if there is a special character in the payload (accent over an é or chinese/pinyin character), the hashes don't match. From what I can read, as long as both languages are using unicode, it should have the same hash. Does anyone know if ruby does something different with encoding special characters that they should account for in their python function?
|
||||||
|
|
||||||
|
They have confirmed with me that the hashes do match if there are no special characters in the data. This seems to only happen with payloads with special characters.
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user