Fixed 267U.pre2
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import define from "../../define.js";
|
||||
import { Antennas } from "../../../../models/index.js";
|
||||
export const meta = {
|
||||
tags: [
|
||||
"antennas",
|
||||
"account"
|
||||
],
|
||||
requireCredential: true,
|
||||
kind: "write:account"
|
||||
};
|
||||
export const paramDef = {
|
||||
type: "object",
|
||||
properties: {
|
||||
antennaId: {
|
||||
type: "string",
|
||||
format: "misskey:id"
|
||||
}
|
||||
},
|
||||
required: [
|
||||
"antennaId"
|
||||
]
|
||||
};
|
||||
export default define(meta, paramDef, async (ps, me)=>{
|
||||
const antenna = await Antennas.findOneBy({
|
||||
userId: me.id,
|
||||
id: ps.antennaId
|
||||
});
|
||||
if (!antenna) {
|
||||
return null;
|
||||
}
|
||||
// await AntennaNotes.update(
|
||||
// {
|
||||
// antennaId: antenna.id,
|
||||
// read: false,
|
||||
// },
|
||||
// {
|
||||
// read: true,
|
||||
// },
|
||||
// );
|
||||
return true;
|
||||
});
|
||||
Reference in New Issue
Block a user