/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v7.3.4
docs/scripts/syncTeamMembers.ts
30 строк
724 B
Olivier Tassinari
[website] Sync team page with HiBob (#45165)
06 фев 2025, 01:07
Не верифицирован
06 фев 2025, 01:07
ac5c4cb
Код
Авторство
О чём код?
/* eslint-disable no-console */ import url from 'url'; import * as fs from 'fs/promises'; import path from 'path'; async function run() { // Same as https://tools-public.mui.com/prod/pages/muicomabout const response = await fetch( 'https://tools-public.mui.com/prod/api/data/muicomabout/queryAbout', { method: 'POST', headers: { 'content-type': 'application/json', }, }, ); const apiResponse = await response.json(); const currentDirectory = url.fileURLToPath(new URL('.', import.meta.url)); await fs.writeFile( path.resolve(currentDirectory, '../data/about/teamMembers.json'), JSON.stringify(apiResponse.data), 'utf8', ); console.log('done'); } run();