1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

feat: generate executables for sasjs/server with web component

This commit is contained in:
Saad Jutt
2021-11-12 06:40:10 +05:00
parent 7b8cd0892c
commit 514a262340
8 changed files with 10310 additions and 262 deletions

View File

@@ -3,21 +3,22 @@ import PropTypes from 'prop-types'
import { CssBaseline, Box, TextField, Button } from '@mui/material'
const headers = {
Accept: 'application/json',
'Content-Type': 'application/json'
}
const getAuthCode = async (credentials: any) => {
return fetch('/SASjsApi/auth/authorize', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
headers,
body: JSON.stringify(credentials)
}).then((data) => data.json())
}
const getTokens = async (payload: any) => {
return fetch('/SASjsApi/auth/token', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
headers,
body: JSON.stringify(payload)
}).then((data) => data.json())
}