squash all commits and fix service worker (file has to be at this specific path by convention):
Added pwa subscription storage for publishers
This commit is contained in:
@ -31,7 +31,7 @@ const axiosServer = async (context) => {
|
||||
}
|
||||
else {
|
||||
//redirect to next-auth login page
|
||||
context.res.writeHead(302, { Location: '/api/auth/signin' });
|
||||
context.res.writeHead(302, { Location: encodeURIComponent('/api/auth/signin') });
|
||||
context.res.end();
|
||||
return { props: {} };
|
||||
}
|
||||
|
@ -912,6 +912,19 @@ function adjustDateForDST(date, timezone) {
|
||||
}
|
||||
exports.adjustDateForDST = adjustDateForDST;
|
||||
|
||||
|
||||
exports.base64ToUint8Array = function (base64String) {
|
||||
const padding = '='.repeat((4 - base64String.length % 4) % 4);
|
||||
const base64 = (base64String + padding)
|
||||
.replace(/-/g, '+')
|
||||
.replace(/_/g, '/');
|
||||
const rawData = atob(base64);
|
||||
const buffer = new Uint8Array(rawData.length);
|
||||
for (let i = 0; i < rawData.length; ++i) {
|
||||
buffer[i] = rawData.charCodeAt(i);
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
// exports.getInitials = function (names) {
|
||||
// const parts = names.split(' '); // Split the full name into parts
|
||||
// if (parts.length === 0) {
|
||||
|
Reference in New Issue
Block a user