(request)
| 132 | }; |
| 133 | |
| 134 | export 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 | |
| 151 | export async function hashHex_f(string) { |
| 152 | const encoder = new TextEncoder(); |
nothing calls this directly
no test coverage detected