chore: deprecating the token field and renaming to backstageToken as token is far too generic
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -89,8 +89,10 @@ export type SerializedTaskEvent = {
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type TaskSecrets = {
|
||||
token: string | undefined;
|
||||
export type TaskSecrets = JsonObject & {
|
||||
/** @deprecated Use `backstageToken` instead */
|
||||
token?: string;
|
||||
backstageToken?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -232,6 +232,9 @@ export async function createRouter(
|
||||
}
|
||||
|
||||
const result = await taskBroker.dispatch(taskSpec, {
|
||||
...req.body.secrets,
|
||||
backstageToken: token,
|
||||
// This is deprecated, but we need to support it for now if people are running their own task broker.
|
||||
token: token,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user