Skip to content

Commit

Permalink
Allow fetching by texture id's
Browse files Browse the repository at this point in the history
  • Loading branch information
TibiNonEst committed Mar 28, 2022
1 parent 5f98fd7 commit 0c07350
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion worker/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export enum RequestedKind {
// IdentityKind determines if the request is for a UUID or a username.
export enum IdentityKind {
Uuid,
Username
Username,
TextureID
}

export enum TextureKind {
Expand Down Expand Up @@ -95,6 +96,8 @@ export function interpretRequest(request: Request): CraftheadRequest | null {
} else if (identity.length === 36) {
identity = identity.replace(/-/g, '')
identityType = IdentityKind.Uuid
} else if (identity.length === 64) {
identityType = IdentityKind.TextureID
} else {
return null
}
Expand Down

0 comments on commit 0c07350

Please sign in to comment.