fix(striker-ui-api): find pre-def cpu vendor before extract first word

main
Tsu-ba-me 1 year ago
parent 6babc33006
commit 6fce2258ba
  1. 3
      striker-ui-api/src/lib/request_handlers/anvil/getAnvilCpu.ts

@ -102,7 +102,8 @@ export const getAnvilCpu: RequestHandler<AnvilDetailParamsDictionary> = async (
const cores = Number(rCores);
const threads = Number(rThreads);
const vendor = model.replace(/^(\w+).*$/, '$1');
const matched = model.match(/amd|arm|intel|powerpc/i);
const vendor = matched ? matched[0] : model.replace(/^(\w+).*$/, '$1');
previous.hosts[uuid] = {
cores,

Loading…
Cancel
Save