Page MenuHomeSealhub

session-id.ts
No OneTemporary

session-id.ts

import { Context, Field } from "../../../main";
import { v4 as uuid } from "uuid";
export default class SessionID extends Field {
typeName = "session-id";
async isProperValue() {
return Field.valid();
}
async encode(_: any, input: string | null): Promise<string | null> {
if (input === null) {
return null;
}
return input ? input : uuid();
}
async getDefaultValue(_: any) {
return uuid();
}
async decode(
_: Context,
storage_value: string | null
): Promise<string | null> {
return storage_value;
}
}

File Metadata

Mime Type
text/x-java
Expires
Sun, Jul 13, 04:41 (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
782684
Default Alt Text
session-id.ts (535 B)

Event Timeline