refactor: separate meta api for admin or not
This commit is contained in:
		| @@ -84,7 +84,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.enableHcaptcha = meta.enableHcaptcha; | ||||
| 			this.hcaptchaSiteKey = meta.hcaptchaSiteKey; | ||||
| 			this.hcaptchaSecretKey = meta.hcaptchaSecretKey; | ||||
|   | ||||
| @@ -95,7 +95,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.enableEmail = meta.enableEmail; | ||||
| 			this.email = meta.email; | ||||
| 			this.smtpSecure = meta.smtpSecure; | ||||
|   | ||||
| @@ -42,7 +42,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.blockedHosts = meta.blockedHosts.join('\n'); | ||||
| 		}, | ||||
|  | ||||
|   | ||||
| @@ -60,7 +60,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.uri = meta.uri; | ||||
| 			this.enableDiscordIntegration = meta.enableDiscordIntegration; | ||||
| 			this.discordClientId = meta.discordClientId; | ||||
|   | ||||
| @@ -60,7 +60,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.uri = meta.uri; | ||||
| 			this.enableGithubIntegration = meta.enableGithubIntegration; | ||||
| 			this.githubClientId = meta.githubClientId; | ||||
|   | ||||
| @@ -60,7 +60,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.uri = meta.uri; | ||||
| 			this.enableTwitterIntegration = meta.enableTwitterIntegration; | ||||
| 			this.twitterConsumerKey = meta.twitterConsumerKey; | ||||
|   | ||||
| @@ -62,7 +62,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.enableTwitterIntegration = meta.enableTwitterIntegration; | ||||
| 			this.enableGithubIntegration = meta.enableGithubIntegration; | ||||
| 			this.enableDiscordIntegration = meta.enableDiscordIntegration; | ||||
|   | ||||
| @@ -120,7 +120,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.useObjectStorage = meta.useObjectStorage; | ||||
| 			this.objectStorageBaseUrl = meta.objectStorageBaseUrl; | ||||
| 			this.objectStorageBucket = meta.objectStorageBucket; | ||||
|   | ||||
| @@ -44,7 +44,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 		}, | ||||
| 		save() { | ||||
| 			os.apiWithDialog('admin/update-meta', { | ||||
|   | ||||
| @@ -46,7 +46,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.proxyAccountId = meta.proxyAccountId; | ||||
| 			if (this.proxyAccountId) { | ||||
| 				this.proxyAccount = await os.api('users/show', { userId: this.proxyAccountId }); | ||||
|   | ||||
| @@ -72,7 +72,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.summalyProxy = meta.summalyProxy; | ||||
| 			this.enableHcaptcha = meta.enableHcaptcha; | ||||
| 			this.enableRecaptcha = meta.enableRecaptcha; | ||||
|   | ||||
| @@ -210,7 +210,7 @@ export default defineComponent({ | ||||
|  | ||||
| 	methods: { | ||||
| 		async init() { | ||||
| 			const meta = await os.api('meta', { detail: true }); | ||||
| 			const meta = await os.api('admin/meta'); | ||||
| 			this.name = meta.name; | ||||
| 			this.description = meta.description; | ||||
| 			this.tosUrl = meta.tosUrl; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 syuilo
					syuilo