Removed frontend changes

Signed-off-by: Matt Mulligan <mmulligan03@gmail.com>
This commit is contained in:
Matt Mulligan
2022-07-23 09:56:10 -04:00
parent b04f689cd0
commit 335bfb727c
4 changed files with 1 additions and 21 deletions
-1
View File
@@ -1,5 +1,4 @@
---
'@backstage/plugin-stack-overflow': patch
'@backstage/plugin-stack-overflow-backend': patch
---
-10
View File
@@ -15,16 +15,6 @@ stackoverflow:
baseUrl: https://api.stackexchange.com/2.2 # alternative: your internal stack overflow instance
```
### Stack Overflow for Teams (private stack overflow instance)
If you have a private stack overflow instance you will need to supply an API key as well. You can read more about how to set this up by going to [Stack Overflows Help Page](https://stackoverflow.help/en/articles/4385859-stack-overflow-for-teams-api)
```yaml
stackoverflow:
baseUrl: https://api.stackexchange.com/2.2 # alternative: your internal stack overflow instance
apiKey: $STACK_OVERFLOW_API_KEY
```
## Areas of Responsibility
This stack overflow frontend plugin is primarily responsible for the following:
-6
View File
@@ -24,11 +24,5 @@ export interface Config {
* @visibility frontend
*/
baseUrl?: string;
/**
* The api key to authenticate to Stack Overflow API
* @visibility secret
*/
apiKey?: string;
};
}
@@ -49,10 +49,7 @@ export const Content = (props: StackOverflowQuestionsContentProps) => {
const { value, loading, error } = useAsync(async (): Promise<
StackOverflowQuestion[]
> => {
const params = qs.stringify(requestParams, {
arrayFormat: 'comma',
addQueryPrefix: true,
});
const params = qs.stringify(requestParams, { addQueryPrefix: true });
const response = await fetch(`${baseUrl}/questions${params}`);
const data = await response.json();
return data.items;