-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
42 lines (39 loc) · 1.21 KB
/
index.html
File metadata and controls
42 lines (39 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- <script src="./mocks/content-type.response.js"></script> -->
<script src="./dist/main.js"></script>
<script>
const baseURL = "https://recharge-settings.herokuapp.com";
const contentType = "application::global-settings.global-settings";
const FormFactory = new StrapiFormBuilder.Factory(baseURL, {
identifier: "test_user",
password: "password"
});
const Client = FormFactory.getStrapiAPI();
const opts = {
"_where[users.username]": "test_user",
"_limit": 1
};
const existingEntries = Client.getEntries("portal-page-settings", {
"_where[users.domain_contains]": "flutterhabit",
"_limit": 1
}).then(entries => {
/**
* This function does the following:
* - it gets the contentType from your Strapi API
* - looks for an existing entry based on params i.e. _where[users.domain_contains]
* - if an existing records is set
*/
FormFactory.getForm(contentType, {}).then(schema => {
debugger;
});
});
</script>
</body>
</html>