MCPcopy Create free account
hub / github.com/Ptechgithub/configs / uuid_validator

Function uuid_validator

worker.js:134–149  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

132};
133
134export async function uuid_validator(request) {
135 const hostname = request.headers.get('Host');
136 const currentDate = new Date();
137
138 const subdomain = hostname.split('.')[0];
139 const year = currentDate.getFullYear();
140 const month = String(currentDate.getMonth() + 1).padStart(2, '0');
141 const day = String(currentDate.getDate()).padStart(2, '0');
142
143 const formattedDate = `${year}-${month}-${day}`;
144
145 // const daliy_sub = formattedDate + subdomain
146 const hashHex = await hashHex_f(subdomain);
147 // subdomain string contains timestamps utc and uuid string TODO.
148 console.log(hashHex, subdomain, formattedDate);
149}
150
151export async function hashHex_f(string) {
152 const encoder = new TextEncoder();

Callers

nothing calls this directly

Calls 1

hashHex_fFunction · 0.85

Tested by

no test coverage detected