instanceSchema: v1.uri -> v2.domain
This commit is contained in:
parent
a4bea06b76
commit
4e7a3e018c
|
@ -176,6 +176,7 @@ const instanceV1Schema = coerceObject({
|
||||||
stats: statsSchema,
|
stats: statsSchema,
|
||||||
thumbnail: z.string().catch(''),
|
thumbnail: z.string().catch(''),
|
||||||
title: z.string().catch(''),
|
title: z.string().catch(''),
|
||||||
|
uri: z.string().catch(''),
|
||||||
urls: coerceObject({
|
urls: coerceObject({
|
||||||
streaming_api: z.string().url().optional().catch(undefined),
|
streaming_api: z.string().url().optional().catch(undefined),
|
||||||
}),
|
}),
|
||||||
|
@ -200,6 +201,7 @@ const instanceSchema = z.preprocess((data: any) => {
|
||||||
registrations,
|
registrations,
|
||||||
short_description,
|
short_description,
|
||||||
thumbnail,
|
thumbnail,
|
||||||
|
uri,
|
||||||
urls,
|
urls,
|
||||||
...instance
|
...instance
|
||||||
} = instanceV1Schema.parse(data);
|
} = instanceV1Schema.parse(data);
|
||||||
|
@ -231,6 +233,7 @@ const instanceSchema = z.preprocess((data: any) => {
|
||||||
email: email,
|
email: email,
|
||||||
},
|
},
|
||||||
description: short_description || description,
|
description: short_description || description,
|
||||||
|
domain: uri,
|
||||||
pleroma: {
|
pleroma: {
|
||||||
...pleroma,
|
...pleroma,
|
||||||
metadata: {
|
metadata: {
|
||||||
|
|
Loading…
Reference in New Issue